A Method and System for Batch Migration of a Single-Light Controller between Platforms
The remote bulk migration method for single lamp controllers addresses inefficiencies in manual migration by using cache management and encryption, enhancing automation, success rates, and security in migrating large numbers of controllers.
Patent Information
- Application Number
- CN202411661521.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2044-11-20
AI Technical Summary
Existing single-light controllers rely on manual operations when migrating to different management platforms, resulting in inefficiency and error-proneness, making it difficult to meet the rapid deployment needs of large-scale intelligent lighting systems.
The functions of cache management, user and project information management, logging, communication encryption are adopted to realize the remote batch migration and status monitoring of single-light controllers. By introducing single-light controller information import module, cache management module and batch operation mechanism, remote automated migration is supported, and data security and consistency are ensured through dynamic retransmission policies and communication encryption mechanisms.
It realizes efficient remote batch migration of single-light controllers, improves operation efficiency, enhances system robustness and data security, and ensures migration success rate and results transparency.
Smart Images

Figure CN119536805B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of single lamp controller migration, and particularly to a method and system for batch migration of single lamp controllers between platforms. Background Art
[0002] When existing single lamp controllers are migrated to different management platforms, they usually rely on manual on-site operations, such as re-burning programs or re-configuring communication parameters. This method is not only time-consuming and laborious, but also easily leads to abnormal operation of the devices due to human operation errors. In addition, the existing migration methods lack batch processing capabilities. Especially when the number of single lamp controllers is large, manual operation efficiency is low, making it difficult to meet the rapid deployment requirements of large-scale intelligent lighting systems. Therefore, there is an urgent need for a technical solution that supports remote batch migration to improve the automation degree and efficiency of single lamp controller migration. Summary of the Invention
[0003] Technical Objectives: Aiming at the deficiencies in the migration of existing single lamp controllers between platforms, the present invention discloses a method and system for batch migration of single lamp controllers between platforms. By introducing functions such as cache management, user and project information management, log recording, and communication encryption, remote batch migration and status monitoring of single lamp controllers are achieved.
[0004] Technical Solutions: To achieve the above technical objectives, the present invention adopts the following technical solutions:
[0005] A method for batch migration of single lamp controllers between platforms includes the following steps:
[0006] Obtain an information list of single lamp controllers to be batch migrated, where the information list includes at least the unique identification serial numbers of each single lamp controller;
[0007] Update the filtering list in the system cache based on the single lamp controller information list. The filtering list contains the single lamp controller serial numbers and their maximum distribution times, and the initial distribution times are set to zero;
[0008] Read the project information associated with each single lamp controller from the system cache. The project information includes project name, IP address or domain name, port, VPN, username, password, network flag, SDK encryption configuration, and automatic reset configuration;
[0009] Loop through the single lamp controller information list and sequentially send communication parameter configuration instructions to each single lamp controller. The communication parameters include IP address or domain name, port, VPN, username, password, network flag, and SDK encryption configuration;
[0010] Record the operation information of each communication parameter configuration instruction issued to the log module. The operation information includes the user's IP address, operation type, operation result, and the serial number of the single-lamp controller, and store the timestamp of the operation in the database;
[0011] After the communication parameter configuration instruction is issued, the system batches issues instructions to query communication parameters to all single-lamp controllers in the single-lamp controller information list, listens for the feedback messages pushed by the telecommunications Internet of Things platform, parses the feedback content, and obtains the actual communication parameters of the single-lamp controller;
[0012] Compare the actual communication parameters fed back by each single-lamp controller with the configured communication parameters. If the communication parameters are inconsistent, reissue the communication parameter configuration instruction to the single-lamp controller until the maximum number of issuances is reached; if the communication parameters are consistent, mark the single-lamp controller as successfully migrated;
[0013] Issue a reset instruction to the successfully migrated single-lamp controller to complete the restart of the single-lamp controller;
[0014] After the migration is completed, clear the filter list in the cache, and feedback the migration result to the front-end interface through Websocket for the user to view.
[0015] The present invention also provides a system for batch migration between single-lamp controller platforms for implementing the above-mentioned method for batch migration between single-lamp controller platforms, including:
[0016] A single-lamp controller migration module for obtaining a list of single-lamp controllers to be migrated, initializing a filter list in the system, and batch executing communication parameter configuration, feedback monitoring, and status update;
[0017] A single-lamp controller information import module for receiving single-lamp controller information from the user front-end, including Excel batch import and manual entry of individual data, and performing data verification to ensure information integrity;
[0018] A user project information management module, including a user management module and a project management module. The user management module is used to manage system user information, including user account creation and role permission configuration; the project management module is used to create and manage project information, including project name, communication parameters, network flag, SDK encryption configuration, and reset configuration, allowing users to create and edit project information, and automatically testing the communication parameter connectivity before the task is started;
[0019] A cache management module for creating and updating the filter list, recording the issuing progress information and the maximum number of issuances of each single-lamp controller in the system cache, and clearing the invalid data in the cache after the migration task is completed;
[0020] A log module, which is used to record user operation information and single lamp controller feedback information during the migration operation process, including the issuance of communication parameters, the issuance of reset instructions, and the modification of project information, and supports filtering and querying historical logs by operation type, user name, and serial number of the single lamp controller;
[0021] A communication interface module, which is used to establish a connection with the telecom Internet of Things platform, push communication parameter configuration instructions to the telecom Internet of Things platform, and monitor the feedback messages of the single lamp controller to obtain actual communication parameters.
[0022] Beneficial effects: The method and system for batch migration between single lamp controller platforms provided by the present invention have the following beneficial effects:
[0023] By introducing a single lamp controller information import module, a cache management module, and a batch operation mechanism, the present invention can support remote automated migration of a large number of single lamp controllers, avoid the low efficiency problem of manual on-site operations in traditional solutions, and greatly improve the operation efficiency.
[0024] Through the dynamic retransmission strategy and the introduction of a cache management module, the system can adjust the operation process in real time according to the network conditions or the feedback information of the single lamp controller, realize automatic retry and interval optimization when the communication parameter configuration fails, and improve the migration success rate and system robustness in complex scenarios compared with the fixed retry method.
[0025] The user and project information management module of the present invention realizes flexible configuration of user permissions and efficient management of project information. The log module supports multi-condition query, ensuring the traceability of operations and the transparency of task results. The communication encryption mechanism ensures the security and consistency of data during transmission, effectively preventing data leakage and tampering, and meeting the requirements for data security. Brief description of the drawings
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for description in the embodiments or the prior art.
[0027] Figure 1 It is a flowchart of the method for batch migration between single lamp controller platforms of the present invention;
[0028] Figure 2 It is an application scenario diagram of the method and system for batch migration between single lamp controller platforms of the present invention;
[0029] Figure 3 It is a software architecture diagram of the method for batch migration between single lamp controller platforms of the present invention;
[0030] Figure 4 It is a flowchart of single lamp controller information entry of the present invention;
[0031] Figure 5 It is a schematic diagram of the system for batch migration between single - lamp controller platforms of the present invention. Specific embodiments
[0032] The present invention will be more clearly and completely described below by way of a preferred embodiment in conjunction with the accompanying drawings, but the present invention is not limited to the scope of the described embodiments.
[0033] As Figure 1 shown, a method for batch migration between single - lamp controller platforms includes the following steps:
[0034] S101. Obtain an information list of single - lamp controllers to be batch - migrated. The information list includes at least the unique identification serial numbers of each single - lamp controller;
[0035] In one embodiment, the information list of single - lamp controllers to be batch - migrated is imported into the system by the user through different projects. This process specifically includes:
[0036] Import of single - lamp controller information, that is, the single - lamp controller data is imported into the system background individually or in batches and loaded into the memory;
[0037] Verification of single - lamp controller information, that is, the serial numbers of single - lamp controllers are audited according to the system verification rules. The verification principle is that the serial number of the single - lamp controller is a serial number that conforms to the verification rules, and is unique in the platform - entered data and the data entered in this batch, and the same serial number cannot appear in the data source. The described verification rule means that the serial number of the single - lamp controller is 12 - digit pure numbers without letters;
[0038] Persistence of single - lamp controller information means that after all verifications pass, the source data is updated, and the single - lamp controller information that passes the verification in the memory is stored in the database;
[0039] Display the import result of the single - lamp controller, that is, the system feeds back the misjudged single - lamp controller information to the front - end according to the verification rules. Specifically, when an error is found during the verification of single - lamp controller information, the data is quickly rolled back, and the error information is sent to the front - end via Websocket to remind the user to view. After the user makes a manual judgment, the data is processed again and imported again until all verifications pass.
[0040] S102. Update the filtering list in the system cache based on the single - lamp controller information list. The filtering list contains the serial numbers of single - lamp controllers and their maximum distribution times, and the initial distribution time is set to zero; where the initial state of the system cache is an empty list. The user selects the single - lamp controller information list that needs to be batch - issued instructions on the front - end interface. The front - end interface filters according to the online status of single - lamp controllers, and the data is transmitted to the background service through the interface.
[0041] S103. Read the project information associated with each single - light controller from the system cache. The project information includes the project name, IP address or domain name, port, VPN, username, password, network flag, SDK encryption configuration, and automatic reset configuration;
[0042] In a specific embodiment, the project information is entered and managed by the user and is included in the user project information management module; the password is encrypted using crypto; the network flag includes automatic public network search, General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Evolution Data only (EV - DO), 4G, 5G, NarrowBand - Internet of Things (NB - IOT), WiFi, and RJ - 45; the SDK encryption configuration indicates whether the single - light controller message is SDK - encrypted; automatic reset means whether the reset instruction is automatically sent after the communication parameter is successfully sent. Among them, the relationship between the project information and the serial number of the single - light controller is one - to - many.
[0043] S104. Traverse the list of single - light controller information in a loop and send communication parameter configuration instructions to each single - light controller in turn. The communication parameters include IP address or domain name, port, VPN, username, password, network flag, and SDK encryption configuration;
[0044] In an embodiment, when sending the communication parameter configuration instruction, the system generates an encrypted message for the communication parameters. The encryption method is symmetric encryption, involving the Advanced Encryption Standard (AES) and the Tiny Encryption Algorithm (TEA), and establishes a connection with the telecom Internet of Things platform through the Netty service to push the encrypted message.
[0045] In one embodiment, communication parameters are created by a user in the system and associated with project information, and after the communication parameters are created, a connectivity test for the target address can be performed. The principle of the connectivity test is that the system generates a random test serial number and generates a heartbeat query message according to the incoming SDK encryption type. The information is sent as a buffer through the copiedBuffer method of the Netty service to the target address through the writeAndFlush method of the User Datagram Protocol (UDP); the system client receives the ChannelHandlerContext object passed in by the SimpleChannelInboundHandler through the channelRead0 method of the Netty service and processes it; after confirming that the serial number and encryption method of the parsed heartbeat packet are consistent with the pushed message, it is pushed to the user who initiated the test in the foreground through the Websocekt service to inform the user that the test is successful; the client waits for 10s to receive the response message from the server, and then exits and releases resources.
[0046] S105. Record the operation information of each issued communication parameter configuration instruction in the log module. The operation information includes the user's IP address, operation type, operation result, and the serial number of the single lamp controller, and store the timestamp of the operation in the database; where the user IP is the IP address of the logged-in user, which is recorded by the front end and transmitted to the background after the user logs in; the operation type includes four types, namely login operation, parameter configuration, parameter issuance, and reset operation. Users can obtain the operation records in the system through the log module, including the issuance records of the single lamp controller, for traceability.
[0047] S106. After the communication parameter configuration instruction is issued, the system issues a query communication parameter instruction to all single lamp controllers in the single lamp controller information list in batches, and listens to the pushed feedback messages of the single lamp controllers through the telecommunications Internet of Things platform, parses the feedback content, and obtains the actual communication parameters of the single lamp controllers.
[0048] Specifically, after receiving the message, the telecommunications Internet of Things platform sends it to the processing unit of the single lamp controller through the nearest base station. After receiving the message information, the single lamp controller parses and runs the instruction, and sends the operation result to the nearest base station. The base station sends the instruction to the telecommunications Internet of Things platform, which further processes and displays it in the front end of the system.
[0049] In one embodiment, multi-thread technology is used to reduce the running load of the background when parsing the message in batches.
[0050] S107. Compare the actual communication parameters fed back by each single - lamp controller with the configured communication parameters. If the communication parameters are inconsistent, resend the communication parameter configuration instruction to this single - lamp controller until the maximum resending times are reached. If the communication parameters are consistent, mark that the migration of this single - lamp controller is successful.
[0051] S108. Send a reset instruction to the single - lamp controller with successful migration to complete the restart of the single - lamp controller.
[0052] In one embodiment, the reset instruction is an optional item and can be selected in the project information. If the reset instruction is not selected for this project, it will not be sent, and manual sending will be performed by the operator after all instructions are sent.
[0053] S109. After the migration is completed, clear the filter list in the cache and feedback the migration result to the front - end interface via Websocket for the user to view.
[0054] The user can observe the modification of the communication parameters of the single - lamp controller in real time through the interface. Subsequently, only the single - lamp controllers with migration failures need to be screened and the instructions resent to push forward the process.
[0055] As Figure 2 shown in the application scenario of a specific embodiment of the present invention. In this scenario, the data flow process is as follows:
[0056] The system generates an encrypted message with communication parameters and pushes it to the telecommunications Internet of Things platform. After receiving the data, the telecommunications Internet of Things platform pushes it to the base station closest to the single - lamp controller. The base station sends out the information through broadcasting. After receiving the encrypted message sent by the base station, the single - lamp controller parses and executes the content of the message. After the execution is completed, the current communication parameters are encrypted into a message and actively reported to the base station. The base station pushes the data to the telecommunications Internet of Things platform. The system listens for the encrypted message pushed by the telecommunications Internet of Things platform, and then decrypts the encrypted message information and displays it on the terminal platform for the user to view.
[0057] As Figure 3 shown in the software architecture diagram of the method for batch migration between single - lamp controller platforms of the present invention. There is a front - end UI interface for the user to operate with a browser. The software system is deployed on an Apache server, and the backend performs data persistence and retrieval through a database.
[0058] The user selects the single - lamp controllers that need to be batch - migrated through the front - end interface and transmits the data to the backend through the backend interface for processing. After the processing is completed, data persistence operations are performed on the data through the backend database to update the migration status and instruction sending time of the single - lamp controller in the background data. When the system is initialized, the corresponding project information is retrieved from the database and loaded into the cache for use.
[0059] As Figure 4The figure shows the information entry flow chart of the single - lamp controller of the present invention. The information of the single - lamp controller is entered by the user through the front - end UI interface, which is divided into Excel batch import and single manual entry. After entry, the system performs verification. After all verifications pass, the single - lamp controller information is synchronized to the system database for persistence. If the verification fails, it is fed back to the user through the front - end UI interface and waits for manual processing before being imported into the system again.
[0060] As Figure 5 shown, the present invention also provides a system for batch migration of single - lamp controllers between platforms, which is used to implement a method for batch migration of single - lamp controllers between platforms as described above, including:
[0061] A single - lamp controller migration module, which is used to obtain the list of single - lamp controller information to be migrated, initialize the filter list in the system, and batch - execute communication parameter configuration, feedback monitoring, and status update;
[0062] A single - lamp controller information import module, which is used to receive single - lamp controller information from the user front - end, including Excel batch import and single - data manual entry, and perform data verification to ensure information integrity; the single - lamp controller information import module includes single - lamp controller information import, single - lamp controller information verification, single - lamp controller information persistence, and display of the import result of single - lamp controller information.
[0063] A user project information management module, including a user management module and a project management module. The user management module is used to manage system user information, including user account creation and role - permission configuration; the project management module is used to create and manage project information, including project name, communication parameters, network flag, SDK encryption configuration, and reset configuration, allowing users to create and edit project information, and automatically test the connectivity of communication parameters before the task starts;
[0064] In one embodiment, the user management module includes a role - permission assignment function. The roles include ordinary users and administrators. Ordinary users can only view and manage the projects they create, and administrators can edit all user information and project information.
[0065] A cache management module, which is used to create and update the filter list, record the distribution progress information and the maximum distribution times of each single - lamp controller into the system cache, and clear the invalid data in the cache after the migration task is completed;
[0066] A log module, which is used to record the user operation information and single - lamp controller feedback information during the migration operation process, including the distribution of communication parameters, the distribution of reset instructions, and the modification of project information, and supports filtering and querying historical logs by operation type, user name, and single - lamp controller serial number;
[0067] In one embodiment, the log module includes a recording module and a query module; the recording module is used to record the operations of the user in the system and the feedback information of the single lamp controller; the query module is used to query historical logs according to filtering conditions, and the filtering conditions include operation type, user name and the serial number of the single lamp controller.
[0068] The communication interface module is used to establish a connection with the telecommunications Internet of Things platform, push communication parameter configuration instructions to the telecommunications Internet of Things platform, and monitor the feedback messages of the single lamp controller to obtain actual communication parameters.
[0069] The present invention also provides a single lamp controller capable of modifying communication parameters, including:
[0070] An acquisition module for acquiring the messages pushed by the base station;
[0071] A storage module for storing communication parameters;
[0072] A processing module for parsing the message into communication parameters and running them on its own program to modify its own communication parameters;
[0073] A sending module for encrypting the current communication parameters to generate a message and sending it to the telecommunications Internet of Things platform.
[0074] The above are only the preferred embodiments of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A method for batch migration between single lamp controller platforms, characterized in that It includes the following steps: Obtain the information list of single lamp controllers to be migrated in batches, where the information list includes at least the unique identification serial numbers of each single lamp controller; Update the filtering list in the system cache based on the single lamp controller information list. The filtering list contains the serial numbers of the single lamp controllers and their maximum sending times, and the initial sending time is set to zero; Read the project information associated with each single lamp controller from the system cache. The project information includes project name, IP address or domain name, port, VPN, username, password, network flag, SDK encryption configuration, and automatic reset configuration; Loop through the single lamp controller information list and sequentially send communication parameter configuration instructions to each single lamp controller. The communication parameters include IP address or domain name, port, VPN, username, password, network flag, and SDK encryption configuration; Record the operation information of each time of sending the communication parameter configuration instruction to the log module. The operation information includes the user's IP address, operation type, operation result, and the serial number of the single lamp controller, and store the timestamp of the operation in the database; After the communication parameter configuration instructions are sent, the system sends a batch query communication parameter instruction to all single lamp controllers in the single lamp controller information list, listens to the feedback messages pushed by the single lamp controllers through the telecommunications Internet of Things platform, parses the feedback content, and obtains the actual communication parameters of the single lamp controllers; Compare the actual communication parameters fed back by each single lamp controller with the configured communication parameters. If the communication parameters are inconsistent, resend the communication parameter configuration instruction to the single lamp controller until the maximum sending times are reached; If the communication parameters are consistent, mark the single lamp controller as successfully migrated; Send a reset instruction to the successfully migrated single lamp controller to complete the restart of the single lamp controller; After the migration is completed, clear the filtering list in the cache, and feedback the migration result to the front-end interface through Websocket for the user to view.
2. A method for batch migration of a single lamp controller between platforms according to claim 1, characterized in that The information list of single lamp controllers to be migrated in batches is imported into the system by the user through different projects. This process specifically includes: Import of single lamp controller information, that is, the single lamp controller data is imported into the system background individually or in batches and loaded into the memory; Verification of single lamp controller information, that is, the serial numbers of single lamp controllers are audited according to the system verification rules. The verification principle is that the serial numbers of single lamp controllers are serial numbers that conform to the verification rules, and are unique in the platform input data and the data input in this batch, and the same serial number cannot appear in the data source; Persistence of single lamp controller information refers to updating the source data after all verifications are passed and storing the single lamp controller information that has passed the verification in the memory into the database; Display the import result of the single lamp controller, that is, the system feedbacks the single lamp controller information judged to be incorrect to the front end according to the verification rules.
3. A method for batch migration between single lamp controller platforms according to claim 2, characterized in that, The verification rule means that the serial number of the single lamp controller is 12-digit pure numbers without letters.
4. A method for batch migration between single lamp controller platforms according to claim 1, characterized in that, The communication parameters are created by the user in the system and associated with the project information, and the connectivity test of the target address is performed after the communication parameters are created.
5. A method for batch migration of a single lamp controller between platforms according to claim 1, characterized in that When sending the communication parameter configuration instruction, the system generates an encrypted message for the communication parameters, establishes a connection with the telecommunications Internet of Things platform through the Netty service, and pushes the encrypted message.
6. A batch migration system between single - lamp controller platforms, which is used to implement a batch migration method between single - lamp controller platforms as described in any one of claims 1 - 5, is characterized in that It includes: Single Lamp Controller Migration Module, which is used to obtain the list of single lamp controller information to be migrated, initialize the filtering list in the system, and batch execute communication parameter configuration, feedback monitoring and status update; Single Lamp Controller Information Import Module, which is used to receive single lamp controller information from the user front end, including Excel batch import and manual entry of individual data, and perform data verification to ensure information integrity; User Project Information Management Module, including User Management Module and Project Management Module. The User Management Module is used to manage system user information, including user account creation and role permission configuration; the Project Management Module is used to create and manage project information, including project name, communication parameters, network flag, SDK encryption configuration and reset configuration, allowing users to create and edit project information, and automatically test the connectivity of communication parameters before the task starts; Cache Management Module, which is used to create and update the filtering list, record the distribution progress information and the maximum distribution times of each single lamp controller in the system cache, and clear the invalid data in the cache after the migration task is completed; Log Module, which is used to record user operation information and single lamp controller feedback information during the migration operation process, including the distribution of communication parameters, the distribution of reset instructions, and the modification of project information, and supports screening and querying historical logs according to operation type, user name and serial number of the single lamp controller; Communication Interface Module, which is used to establish a connection with the telecommunications Internet of Things platform, push communication parameter configuration instructions to the telecommunications Internet of Things platform, and listen to the feedback messages of the single lamp controller to obtain actual communication parameters.
7. A batch migration system between single lamp controller platforms according to claim 6, characterized in that The Single Lamp Controller Information Import Module includes single lamp controller information import, single lamp controller information verification, single lamp controller information persistence, and display of the import results of single lamp controller information.
8. A batch migration system between single lamp controller platforms according to claim 6, characterized in that The Log Module includes a recording module and a query module; the recording module is used to record the operations of users in the system and the feedback information of the single lamp controller; the query module is used to query historical logs according to filtering conditions, and the filtering conditions include operation type, user name and serial number of the single lamp controller.
9. A single lamp controller platform - to - platform batch migration system according to claim 6, characterized in that, The User Management Module includes a role permission allocation function. The roles include ordinary users and administrators. Ordinary users can only view and manage the projects they create, and administrators can edit all user information and project information.
Citation Information
Patent Citations
Configuration multi-data-source automatic data migration method and system
CN116049145A
Method and device for data migration in database cluster and storage medium
WO2018099397A1