Configuration parameter synchronization method, device, computer equipment and readable storage medium

By detecting and dividing the target device set and assigning configuration parameter synchronization permissions, parallel processing of multi-device configuration parameter synchronization is realized, solving the problem of low synchronization efficiency of device configuration parameter and improving synchronization efficiency.

CN118820367BActive Publication Date: 2025-03-21SHENZHEN PUDU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411298606.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2025-03-21
Estimated Expiration
2044-09-18

AI Technical Summary

Technical Problem

In the installation and deployment of multiple devices or new devices, managers need to configure parameters one by one, resulting in low efficiency in synchronization of configuration parameters of the device.

Method used

By obtaining the target device set, the current target device that has completed the synchronization of configuration parameters is detected and used as the new source device, the target device set is divided into the first processing device set and the second processing device set, and the configuration parameter synchronization permission is assigned to the new source device, so that it synchronizes the configuration parameters to the target device in the second processing device set based on the local configuration file.

Benefits of technology

The parallel processing of the synchronous configuration parameters of the target device by the current source equipment and the newly added source equipment is realized, and the synchronization efficiency of the configuration parameters of the target device is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118820367B_ABST
    Figure CN118820367B_ABST
Patent Text Reader

Abstract

The present application relates to a configuration parameter synchronization method, device, computer equipment and readable storage medium. The method comprises: obtaining a target device set; in the process of synchronizing configuration parameters to target devices in the target device set based on a configuration file, when a current target device that has completed configuration parameter synchronization is detected, the current target device is used as a newly added source device; the target devices in the target device set that have not started configuration parameter synchronization are divided to obtain a first processing device set corresponding to the current source device and a second processing device set corresponding to the newly added source device; based on the configuration file, the configuration parameters are continued to be synchronized to the target devices in the first processing device set, and the configuration parameter synchronization authority corresponding to the second processing device set is allocated to the newly added source device, so that the newly added source device synchronizes the configuration parameters to the target devices in the second processing device set based on the local configuration file. The use of this method can improve the efficiency of configuration parameter synchronization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data synchronization, and in particular to a configuration parameter synchronization method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] With the popularity of smart devices, deploying multiple devices in the same area is a common device application scenario, such as production equipment in factories, cleaning equipment in shopping malls, and food delivery equipment in hotels. In order to achieve the unified functions of each device, it is necessary to ensure the synchronization of the configuration parameters of each device. However, in the installation and deployment of multiple devices or newly added devices, the management personnel need to configure the parameters of each device one by one to complete the synchronization of the configuration parameters of the devices, resulting in low efficiency of device configuration parameter synchronization. Summary of the invention

[0003] Based on this, it is necessary to provide a configuration parameter synchronization method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the configuration parameter synchronization efficiency of the device in response to the above technical problems.

[0004] In a first aspect, the present application provides a configuration parameter synchronization method, which is applied to a current source device, comprising:

[0005] Get the target device set;

[0006] In the process of synchronizing configuration parameters to target devices in the target device set based on the configuration file, when a current target device that has completed configuration parameter synchronization is detected, the current target device that has completed configuration parameter synchronization is used as a newly added source device;

[0007] Divide the target devices in the target device set that have not started configuration parameter synchronization to obtain a first processing device set corresponding to the current source devices and a second processing device set corresponding to the newly added source devices;

[0008] Continue to synchronize configuration parameters to the target devices in the first processing device set based on the configuration file, and assign configuration parameter synchronization permissions corresponding to the second processing device set to the newly added source device, so that the newly added source device synchronizes configuration parameters to the target devices in the second processing device set based on the local configuration file.

[0009] In a second aspect, the present application also provides a configuration parameter synchronization device, including:

[0010] A device acquisition module is used to acquire a target device set;

[0011] A device adding module, used for, in the process of synchronizing configuration parameters to target devices in a target device set based on a configuration file, when a current target device that has completed configuration parameter synchronization is detected, using the current target device that has completed configuration parameter synchronization as a newly added source device;

[0012] A device division module, used for dividing the target devices in the target device set that have not started configuration parameter synchronization, to obtain a first processing device set corresponding to the current source device and a second processing device set corresponding to the newly added source device;

[0013] The authority allocation module is used to continue synchronizing configuration parameters to the target devices in the first processing device set based on the configuration file, and to allocate the configuration parameter synchronization authority corresponding to the second processing device set to the newly added source device, so that the newly added source device can synchronize the configuration parameters to the target devices in the second processing device set based on the local configuration file.

[0014] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0015] Get the target device set;

[0016] In the process of synchronizing configuration parameters to target devices in the target device set based on the configuration file, when a current target device that has completed configuration parameter synchronization is detected, the current target device that has completed configuration parameter synchronization is used as a newly added source device;

[0017] Divide the target devices in the target device set that have not started configuration parameter synchronization to obtain a first processing device set corresponding to the current source devices and a second processing device set corresponding to the newly added source devices;

[0018] Continue to synchronize configuration parameters to the target devices in the first processing device set based on the configuration file, and assign configuration parameter synchronization permissions corresponding to the second processing device set to the newly added source device, so that the newly added source device synchronizes configuration parameters to the target devices in the second processing device set based on the local configuration file.

[0019] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0020] Get the target device set;

[0021] In the process of synchronizing configuration parameters to target devices in the target device set based on the configuration file, when a current target device that has completed configuration parameter synchronization is detected, the current target device that has completed configuration parameter synchronization is used as a newly added source device;

[0022] Divide the target devices in the target device set that have not started configuration parameter synchronization to obtain a first processing device set corresponding to the current source devices and a second processing device set corresponding to the newly added source devices;

[0023] Continue to synchronize configuration parameters to the target devices in the first processing device set based on the configuration file, and assign configuration parameter synchronization permissions corresponding to the second processing device set to the newly added source device, so that the newly added source device synchronizes configuration parameters to the target devices in the second processing device set based on the local configuration file.

[0024] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0025] Get the target device set;

[0026] In the process of synchronizing configuration parameters to target devices in the target device set based on the configuration file, when a current target device that has completed configuration parameter synchronization is detected, the current target device that has completed configuration parameter synchronization is used as a newly added source device;

[0027] Divide the target devices in the target device set that have not started configuration parameter synchronization to obtain a first processing device set corresponding to the current source devices and a second processing device set corresponding to the newly added source devices;

[0028] Continue to synchronize configuration parameters to the target devices in the first processing device set based on the configuration file, and assign configuration parameter synchronization permissions corresponding to the second processing device set to the newly added source device, so that the newly added source device synchronizes configuration parameters to the target devices in the second processing device set based on the local configuration file.

[0029] The above-mentioned configuration parameter synchronization method, device, computer equipment, computer-readable storage medium and computer program product, in the process of synchronizing configuration parameters to each target device according to the configuration file, when the current target device that has completed the configuration parameter synchronization is detected, the current target device that has completed the configuration parameter synchronization is used as a new source device, thereby realizing the expansion of the new source device; then the target devices in the target device that have not started the configuration parameter synchronization are divided into a first processing device set and a second processing device set, and the configuration parameter synchronization authority of the second processing device set is allocated to the new source device, so that while the current source device continues to synchronize the configuration parameters of the target device in the first processing device set, the configuration parameters of the target device in the second processing device set can be synchronized through the new source device, thereby realizing the parallel processing of the current source device and the new source device on the target device synchronization configuration parameters, thereby improving the configuration parameter synchronization efficiency of the target device. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0031] Figure 1 An application environment diagram of a configuration parameter synchronization method in an embodiment;

[0032] Figure 2 A schematic diagram of a flow chart of a configuration parameter synchronization method in an embodiment;

[0033] Figure 3 A schematic diagram of a flow chart of a configuration parameter synchronization step in an embodiment;

[0034] Figure 4 A schematic diagram of a flow chart of a configuration parameter synchronization method in an embodiment;

[0035] Figure 5 It is a structural block diagram of a configuration parameter synchronization device in one embodiment;

[0036] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0038] The configuration parameter synchronization method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. The current source device 102 communicates with the target device 104 in the target device set through the network. In one embodiment, the current source device 102 obtains the target device set; in the process of synchronizing configuration parameters to the target device 104 in the target device set based on the configuration file, when the current source device 102 detects the current target device that has completed the configuration parameter synchronization, the current target device that has completed the configuration parameter synchronization is used as a newly added source device; the current source device 102 divides the target devices 104 in the target device set that have not started the configuration parameter synchronization, and obtains the first processing device set corresponding to the current source device and the second processing device set corresponding to the newly added source device; the current source device 102 continues to synchronize the configuration parameters to the target device 104 in the first processing device set based on the configuration file, and allocates the configuration parameter synchronization authority corresponding to the second processing device set to the newly added source device, so that the newly added source device synchronizes the configuration parameters to the target device 104 in the second processing device set based on the local configuration file. Among them, the current source device 102 can be a terminal; the terminal can be, but is not limited to, various robots, unmanned vehicles, personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Robots can be cleaning robots, delivery robots, logistics robots, inspection robots, etc. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0039] In one embodiment, Figure 2 As shown, a configuration parameter synchronization method is provided. The following is an example of the method being executed by the current source device, and includes the following steps:

[0040] Step 202: The current source device obtains a target device set.

[0041] Step 204 , in the process of synchronizing configuration parameters to target devices in the target device set based on the configuration file, when a current target device that has completed configuration parameter synchronization is detected, the current target device that has completed configuration parameter synchronization is used as a newly added source device.

[0042] The current source device is the device that currently has the function of synchronizing configuration parameters to the target device. The target device is the device to be synchronized with configuration parameters. The newly added source device is the device that has the function of synchronizing configuration parameters to other target devices after the configuration parameter synchronization is completed.

[0043] Specifically, the operator can enter the configuration file through the human-computer interaction interface of the current source device. After receiving the configuration file, the current source device restarts and runs according to the configuration file. Then the operator sets the current source device as a copy device, indicating that the current source device is used as a copy source of the configuration file to provide the configuration file to the target device; and sets the target device as a paste device to receive the configuration file sent by the current source device for configuration parameter synchronization.

[0044] After the current source device has completed the configuration according to the newly entered configuration file, it searches for whether there is a target device set in the current area. The current area can refer to the area where the current source device is located, or it can be a designated area, such as a shopping mall, hotel, etc. If it does not exist, the configuration parameter synchronization process will not be performed; if it exists, the configuration parameters will be synchronized to the target devices in the target device set according to the configuration file, and the current target device that has completed the configuration parameter synchronization will be monitored in real time, that is, the target device that has completed the configuration parameter synchronization will be used as the current target device. Specifically, the current source device determines the target device that currently needs to synchronize configuration parameters in the target device set, sends the configuration file to the target device, and when the target device configures the configuration file and runs successfully, it determines that the target device has completed the configuration parameter synchronization and can be used as the current target device. Then, the current target device sends a configuration success message to the current source device. After receiving the configuration success message, the current source device determines the current target device that sent the configuration success message as the newly added source device, which can be to set the newly added source device from the pasting device to the copy device.

[0045] In one embodiment, the current source device and each target device in the target device set are connected to the same local area network in the current area, and information is exchanged through the local area network. After the current source device is configured according to the newly entered configuration file, it broadcasts a device search signal to the local area network, and when the response information of each target device to the device search signal is received, it is determined that the target device set exists in the current area.

[0046] Step 206 , dividing the target devices in the target device set that have not started configuration parameter synchronization to obtain a first processing device set corresponding to the current source device and a second processing device set corresponding to the newly added source device.

[0047] The first processing device set refers to a target device set for which the current source device can synchronize configuration parameters, and the second processing device set refers to a target device set for which the newly added source device can synchronize configuration parameters.

[0048] Specifically, after the current source device determines the current target device that has completed configuration parameter synchronization as a newly added source device, the target devices in the target device set that have not started configuration parameter synchronization are divided. The target devices that have not started configuration parameter synchronization refer to the remaining target devices in the target device set that have not received the configuration file and have not completed configuration parameter synchronization according to the configuration file. The current source device can count the number of target devices in the target device set that have not started configuration parameter synchronization, as well as the number of source devices of the current source device and the newly added source device, and calculate the allocation number corresponding to the current source device and the device allocation number corresponding to the newly added source device based on the number of target devices and the number of source devices. The current source device divides the target devices that have not started configuration parameter synchronization based on the allocation number corresponding to the current source device and the device allocation number corresponding to the newly added source device, and obtains a first processing device set corresponding to the current source device and a second processing device set corresponding to the newly added source device.

[0049] In one embodiment, the current source device broadcasts a device search signal to the local area network, and receives response information from each target device to the device search signal. The response information may be a configuration parameter acquisition request, and the configuration parameter acquisition request refers to the target device requesting the source device to obtain the configuration file for configuration parameter synchronization processing. The current source device generates a configuration synchronization queue for each target device according to the timing of the configuration parameter acquisition request sent by each target device. The configuration synchronization queue also includes the device information of each target device, such as the communication address of the target device. Then the current source device synchronizes the configuration parameters of each target device in turn according to the configuration synchronization queue. After the current target device is determined as a newly added source device, the remaining target devices in the configuration synchronization queue are divided, which can be to calculate the ratio of the number of target devices to the number of source devices to obtain the number of device allocations corresponding to the current source device and the newly added source device, for example, if the number of target devices is 10 and the number of source devices is 2, then the number of device allocations corresponding to the current source device and the newly added source device are both 5. The current source device is counted according to the device allocation quantity corresponding to the newly added source device, starting from the last device in the configuration synchronization queue, and the second processing device set corresponding to the newly added source device is deleted in the configuration synchronization queue. The first processing device set corresponding to the current source device is obtained based on the remaining target devices in the configuration synchronization queue.

[0050] Step 208, continue to synchronize configuration parameters to the target devices in the first processing device set based on the configuration file, and assign configuration parameter synchronization permissions corresponding to the second processing device set to the newly added source device, so that the newly added source device synchronizes configuration parameters to the target devices in the second processing device set based on the local configuration file.

[0051] The configuration parameter synchronization permission refers to the device information of the newly added source device that can synchronize configuration parameters.

[0052] Specifically, the current source device divides the target devices in the target device set that have not started configuration parameter synchronization into the first processing device set and the second processing device set, continues to synchronize the configuration parameters in the configuration file to the target devices in the first processing device set, and allocates the configuration parameter synchronization authority corresponding to the second processing device set to the newly added source device. Specifically, the device information of each target device in the second processing device set can be sent to the newly added source device, so that the newly added source device communicates with each target device in the second processing device set according to the device information, and sends the configuration file to each target device in the second processing device set for configuration parameter synchronization processing, until the synchronization of the configuration parameters of the target devices in the target device set is completed.

[0053] In one embodiment, the first processing device set is used as the target device set, and in the process of synchronizing configuration parameters to target devices in the target device set based on the configuration file, when the current target device that has completed configuration parameter synchronization is detected, the current target device is used as a new source device until the synchronization of configuration parameters of the target devices in the first processing device set is completed.

[0054] The second processing device set is used as the target device set, the newly added source device is used as the current source device, and in the process of synchronizing configuration parameters to the target devices in the target device set based on the configuration file, when the current target device that has completed the configuration parameter synchronization is detected, the current target device is used as a newly added source device until the synchronization of the configuration parameters of the target devices in the second processing device set is completed.

[0055] In the above configuration parameter synchronization method, during the process of synchronizing configuration parameters to each target device according to the configuration file, when the current target device that has completed the configuration parameter synchronization is detected, the current target device is used as a newly added source device, thereby realizing the expansion of the newly added source device; then the target devices in the target device for which the configuration parameter synchronization has not been started are divided into a first processing device set and a second processing device set, and the configuration parameter synchronization authority of the second processing device set is allocated to the newly added source device, so that while the current source device continues to synchronize the configuration parameters to the target devices in the first processing device set, the configuration parameters of the target devices in the second processing device set can be synchronized through the newly added source device, thereby realizing the parallel processing of the synchronization configuration parameters of the target devices by the current source device and the newly added source device, thereby improving the configuration parameter synchronization efficiency of the target devices.

[0056] In one embodiment, Figure 3 In step 202, after acquiring the target device, the configuration parameter synchronization method further includes:

[0057] Step 302, sending the source device address of the current source device to the target device in the target device set, and receiving the target identity authentication information sent by the target device based on the source device address;

[0058] Step 304, when the target identity authentication information is verified based on the local identity authentication information, the current device version information is sent to the target device, so that the target device performs version matching on the current device version information based on the local device version information;

[0059] Step 306: receiving a configuration parameter acquisition request sent by the target device when the version matching is successful, and sending a configuration file to the target device, so that the target device synchronizes configuration parameters based on the configuration file.

[0060] The source device address refers to the communication address that can communicate with the current source device. The target identity information refers to the identity information corresponding to the target device. The local identity information refers to the identity information stored locally by the current source device. The current device version information refers to the device version information that can run the configuration file, indicating the device version information that the current source device can run according to the configuration file. The local device version information refers to the device version information stored locally by the target device.

[0061] Specifically, the current source device and the target device in the target device set are pre-set with identity authentication information for identity authentication between the current source device and the target device. The current source device sends the source device address of the current source device to the target device in the target device set, which can be the current source device broadcasting its own IP address to the target device in the local area network, or the target device in the target device set sending the IP query broadcast of the current source device to the local area network and obtaining the IP address of the current source device. The target device obtains the source device address of the current source device and sends the target identity authentication information to the source device address.

[0062] The current source device uses the local authentication information to authenticate the target authentication information of the target device. For example, when the target authentication information is consistent with the local authentication information, it is determined that the authentication of the target device is successful. Then the current source device sends the current device version information to the target device that has passed the authentication. After receiving the current device version information, the target device matches the local device version information with the current device version information. For example, when the local device version is not lower than the current device version, the target device determines that the version match is successful and can perform configuration parameter synchronization processing. Then the target device sends a configuration parameter acquisition request to the current source device.

[0063] The current source device returns a configuration file to the target device that sent the configuration parameter acquisition request. After receiving the configuration file, the target device performs parameter configuration according to the configuration file to complete configuration parameter synchronization.

[0064] In this embodiment, identity authentication of the target device is performed to ensure the identity security of the target device, and version matching of the target device is performed to ensure the validity of the configuration file.

[0065] In one embodiment, the target device stores an asymmetric encryption public key and an asymmetric encryption private key, and the configuration parameter acquisition request carries the asymmetric encryption public key; step 306, sending a configuration file to the target device, includes:

[0066] Encrypt the configuration parameter key based on the asymmetric encryption public key to obtain encrypted data;

[0067] Sending the encrypted data to the target device so that the target device decrypts the encrypted data based on the asymmetric encryption private key to obtain the configuration parameter key;

[0068] Encrypt the configuration file based on the configuration parameter key to obtain an encrypted file;

[0069] The encrypted file is sent to the target device, so that the target device decrypts the encrypted file based on the configuration parameter key to obtain the configuration file.

[0070] The asymmetric encryption public key is the key used by the current source device to encrypt the configuration parameter key. The asymmetric encryption private key is the key used by the target device to decrypt the encrypted configuration parameter key. The configuration parameter key is a symmetric encryption key used to encrypt and decrypt the configuration file.

[0071] Specifically, the target devices in the target device set are pre-set with an asymmetric encryption public key and an asymmetric encryption private key. After the version matching is successful, the target device generates a configuration parameter acquisition request according to the asymmetric encryption public key, and sends the configuration parameter acquisition request to the current source device. The current source device uses the asymmetric encryption public key in the configuration parameter acquisition request to encrypt the preset configuration parameter key to obtain encrypted data. Then, according to the device information of the target device, the target device address corresponding to the target device is read, and the encrypted data is sent to the target device address. The target device decrypts the encrypted data according to the local asymmetric encryption private key to obtain the configuration parameter key.

[0072] Then the current source device uses the configuration parameter key to encrypt the configuration file to obtain an encrypted file. The encrypted file is sent to the target device address, and the target device decrypts the encrypted file according to the configuration parameter key to obtain the configuration file, and performs configuration parameter synchronization according to the configuration file.

[0073] In a specific embodiment, the current source device assigns the configuration parameter synchronization authority corresponding to the second processing device set to the newly added source device, and the device information corresponding to the configuration parameter synchronization authority also includes a configuration parameter key. The newly added source device then regenerates a new asymmetric encryption public key and an asymmetric encryption private key, and sends the newly generated asymmetric encryption public key to the target device in the second processing device set. The newly added source device then uses the asymmetric encryption private key to encrypt the configuration parameter key to obtain encrypted data; the encrypted data is sent to the target device in the second processing device set so that the target device uses the asymmetric encryption public key to decrypt the encrypted data to obtain the configuration parameter key; the newly added source device then uses the configuration parameter key to encrypt the configuration file to obtain an encrypted file, and sends the encrypted file to the target device in the second processing device set so that the target device in the second processing device set uses the configuration parameter key to decrypt the encrypted file to obtain the configuration file.

[0074] In this embodiment, by encrypting the configuration parameter key and using the configuration parameter key to encrypt the configuration file, the data security of the configuration parameter key is guaranteed and the data security of the configuration file is improved.

[0075] In one embodiment, in step 202, after acquiring the target device, the configuration parameter synchronization method further includes:

[0076] Sending a version query instruction to a target device in the target device set, and obtaining local device version information returned by the target device based on the version query instruction;

[0077] Sending a configuration file to a normal target device corresponding to the local device version information that successfully matches the current device version information, so that the normal target device synchronizes configuration parameters based on the configuration file;

[0078] A version update data packet is sent to a suspended target device corresponding to the local device version information that fails to match the current device version information, so that the suspended target device performs version update based on the version update data packet.

[0079] Among them, a normal target device refers to a target device with a successful version match. A suspended target device refers to a target device with a failed version match. A version update data packet refers to a data packet that updates the operating system or application function of the target device, which can update the version identifier of the operating system or application function of the target device.

[0080] Specifically, after the current source device passes the identity authentication of the target device in the target device set, it sends a version query instruction to the target device to obtain the local device version information returned by the target device. Then the current source device performs version matching based on the current device version information and the local device version information returned by the target device, and determines the target device whose local device version information is greater than or equal to the current device version information as a normal target device; the target device whose local device version information is less than the current device version information is determined as a suspended target device, indicating that the operating system or application function corresponding to the device version information of the suspended target device is not compatible with the configuration file, and the configuration parameter synchronization processing cannot be performed according to the configuration file. The current source device sends the configuration file to the target device address of the normal target device, so that the normal target device synchronizes the configuration parameters according to the configuration file; and sends a version update data packet to the suspended target device, so that the suspended target device installs the version update data packet for version update. The current source device can also send a version matching failure notification to the suspended target device, so that the suspended target device downloads the version update data packet from the cloud for version update, and returns the updated device version information to the current source device. The current source device matches the current device version information according to the updated device version information. If the match is successful, the suspended target device is converted to a normal target device and the configuration file is sent; if the match fails, the configuration parameter synchronization process for the suspended target device is stopped.

[0081] In this embodiment, by sending a configuration file to a normal target device, the accuracy of the configuration of the configuration file by the normal target device is ensured, and by sending a version update data packet to the suspended target device so that the suspended target device performs a version update, the validity of the configuration parameter synchronization of the target device is ensured.

[0082] In one embodiment, the configuration file includes a target device model; step 204, in the process of synchronizing configuration parameters to target devices in the target device set based on the configuration file, includes:

[0083] A configuration file is sent to the target device so that when the local device model of the target device does not meet the target device model, the target device determines the shared configuration items and the non-shared configuration items in the configuration file based on the configuration relationship between the local device model and the target device model; the updated configuration parameters corresponding to the shared configuration items are obtained from the configuration file, and the updated configuration parameters corresponding to the non-shared configuration items are obtained from the configuration management end; the historical configuration parameters of the shared configuration items and the historical configuration parameters of the non-shared configuration items in the local area are replaced with the corresponding updated shared configuration parameters.

[0084] Among them, the configuration relationship refers to the configuration items and configuration parameters that can be shared between different device models. Shared configuration items refer to configuration items that can be shared between local device signals and target device signals. Non-shared configuration items refer to configuration items that cannot be shared between local device signals and target device signals.

[0085] Specifically, the configuration file includes the target device model, indicating that the configuration file can be applied to the device corresponding to the target device model. The current source device sends the configuration file to the target device. If the local device model of the target device does not meet the target device model, that is, the local device model is inconsistent with the target device model, the target device determines the shared configuration items and non-shared configuration items in the configuration file based on the configuration relationship between the local device model and the target device model, such as shared configuration items such as screen brightness, prompt duration, and running speed, and non-shared configuration items such as cleaning items of the cleaning robot and meal pickup items of the food delivery robot. The target device obtains the updated configuration parameters corresponding to the shared configuration items from the configuration file, and obtains the updated configuration parameters corresponding to the non-shared configuration items from the configuration management end, and then replaces the historical configuration parameters of the shared configuration items and the historical configuration parameters of the non-shared configuration items in the local with the corresponding updated shared configuration parameters. The target device then runs the device according to the configuration parameters corresponding to the shared configuration items and the non-shared configuration items, respectively.

[0086] If the local device model of the target device meets the target device model, that is, the local device model is consistent with the target device model, the target device does not need to distinguish between shared configuration items and non-shared configuration items in the configuration file. The target device updates the local historical configuration parameters according to the configuration parameters corresponding to each configuration item in the configuration file, and then the target device runs the device according to the configuration parameters corresponding to each configuration item.

[0087] In this embodiment, when the device models are inconsistent, parameter configuration is performed according to the updated configuration parameters of the shared configuration in the configuration file, thereby realizing parameter configuration across device models, simplifying the device parameter configuration process, and thus improving the device parameter configuration efficiency of different device models.

[0088] In one embodiment, step 204, in the process of synchronizing configuration parameters to target devices in the target device set based on the configuration file, includes:

[0089] Send the configuration file to the target device so that the target device replaces the local historical configuration file with the configuration file after successful reception, and performs parameter verification on the configuration file after restarting, and resets the target configuration parameters in the configuration file that exceed the preset configuration range to the historical configuration parameters.

[0090] Specifically, the current source device sends a configuration file to the target device. After successfully receiving the configuration file, the target device performs configuration parameter synchronization processing, specifically replacing the local historical configuration file with the received configuration file, and restarting the device. After restarting, the target device performs parameter verification on the configuration file, and the target device may configure parameters for each local configuration item according to the configuration file. When there is a target configuration parameter of a target configuration item that exceeds the preset configuration range, that is, when the target device fails to configure the target configuration item according to the target configuration parameter, the configuration item corresponding to the target configuration parameter is rolled back, and the historical configuration parameter corresponding to the configuration item is restored. Then, after the parameter configuration of each configuration item is completed, the target device runs the device according to the configuration parameters of each configuration item.

[0091] In this embodiment, when there are target configuration parameters exceeding a preset configuration range in the configuration file, the target configuration parameters are discarded and reset to historical configuration parameters, thereby ensuring the validity of parameter configuration of the target device.

[0092] In a specific embodiment, Figure 4 As shown, a timing diagram for configuration parameter synchronization is provided. The operator selects the current source device from the various devices in the current area, and selects other devices as target devices, and then enters the configuration file into the current source device. After the current source device successfully runs according to the configuration file, the operator sets the current source device as a copy device and sets the target device as a paste device. The current source device then generates local identity authentication information and a configuration parameter key. The local identity authentication information is, for example, a random verification code, and the configuration parameter key is, for example, a random AES key. The operator can send the local identity authentication information to the target device as the target identity authentication information in the target device before the current source device starts configuration parameter synchronization with the target device.

[0093] The current source device and the target device are connected to the same local area network. The current source device broadcasts its own IP address to the target device in the local area network. The target device sends the target identity authentication information to the IP address of the current source device. The current source device verifies the received target identity authentication information with the local identity authentication information, and returns a verification pass message to the target device after the verification is passed. Then the current device version information is sent to the target device. The target device matches the version information with the current device version information according to the local device version information, and sends a configuration parameter acquisition request to the current source device after the version matching is successful. The configuration parameter acquisition request carries an asymmetric encryption public key. The current source device generates a configuration synchronization queue according to the configuration parameter acquisition request sent by the target device, wherein the current source device can notify the target device of the device queue status in the configuration synchronization queue, and then the target device generates an asymmetric encryption public key and returns it to the current source device without carrying the asymmetric encryption public key in the configuration parameter acquisition request. The current source device uses the asymmetric encryption public key to encrypt the configuration parameter key to obtain encrypted data, and sends the encrypted data to the target device. The target device uses the asymmetric encryption private key to decrypt the encrypted data to obtain the configuration parameter key. Then the current source device uses the configuration parameter key to encrypt the configuration file, obtains the encrypted file, and sends the encrypted file to the target device. The target device uses the configuration parameter key to decrypt the encrypted file to obtain the configuration file, and then uses the configuration file to overwrite the local historical configuration file. After the target device restarts, it reads the configuration parameters in the configuration file and verifies the configuration parameters. After the verification passes, the target device completes the configuration parameter synchronization.

[0094] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0095] Based on the same inventive concept, the embodiment of the present application also provides a configuration parameter synchronization device for implementing the configuration parameter synchronization method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more configuration parameter synchronization device embodiments provided below can refer to the above limitations on the configuration parameter synchronization method, and will not be repeated here.

[0096] In an exemplary embodiment, Figure 5 As shown, a configuration parameter synchronization device 500 is provided, including: a device acquisition module 502, a device addition module 504, a device division module 506 and a permission allocation module 508, wherein:

[0097] The device acquisition module 502 is used to acquire a target device set;

[0098] A device adding module 504 is used for, in the process of synchronizing configuration parameters to target devices in the target device set based on the configuration file, when a current target device that has completed configuration parameter synchronization is detected, to use the current target device that has completed configuration parameter synchronization as a newly added source device;

[0099] The device division module 506 is used to divide the target devices in the target device set that have not started configuration parameter synchronization to obtain a first processing device set corresponding to the current source device and a second processing device set corresponding to the newly added source device;

[0100] The authority allocation module 508 is used to continue synchronizing configuration parameters to the target devices in the first processing device set based on the configuration file, and to allocate the configuration parameter synchronization authority corresponding to the second processing device set to the newly added source device, so that the newly added source device can synchronize the configuration parameters to the target devices in the second processing device set based on the local configuration file.

[0101] In one embodiment, the configuration parameter synchronization device 500 is also used to send the source device address of the current source device to the target device in the target device set, and receive the target identity authentication information sent by the target device based on the source device address; when the target identity authentication information is verified based on the local identity authentication information, send the current device version information to the target device, so that the target device performs version matching on the current device version information based on the local device version information; receive the configuration parameter acquisition request sent by the target device when the version matching is successful, and send the configuration file to the target device, so that the target device synchronizes the configuration parameters based on the configuration file.

[0102] In one embodiment, the target device stores an asymmetric encryption public key and an asymmetric encryption private key, and the configuration parameter acquisition request carries the asymmetric encryption public key; the configuration parameter synchronization device 500 is also used to encrypt the configuration parameter key based on the asymmetric encryption public key to obtain encrypted data; send the encrypted data to the target device so that the target device decrypts the encrypted data based on the asymmetric encryption private key to obtain the configuration parameter key; encrypt the configuration file based on the configuration parameter key to obtain an encrypted file; send the encrypted file to the target device so that the target device decrypts the encrypted file based on the configuration parameter key to obtain the configuration file.

[0103] In one embodiment, the configuration parameter synchronization device 500 is also used to send a version query instruction to the target device in the target device set to obtain the local device version information returned by the target device based on the version query instruction; send a configuration file to the normal target device corresponding to the local device version information that successfully matches the current device version information, so that the normal target device synchronizes the configuration parameters based on the configuration file; send a version update data packet to the suspended target device corresponding to the local device version information that fails to match the current device version information, so that the suspended target device performs a version update based on the version update data packet.

[0104] In one embodiment, the configuration file includes a target device model; the device addition module 504 is further used to send the configuration file to the target device, so that when the local device model of the target device does not meet the target device model, the target device determines the shared configuration items and the non-shared configuration items in the configuration file based on the configuration relationship between the local device model and the target device model; obtains the updated configuration parameters corresponding to the shared configuration items from the configuration file, and obtains the updated configuration parameters corresponding to the non-shared configuration items from the configuration management end; replaces the historical configuration parameters of the shared configuration items and the historical configuration parameters of the non-shared configuration items in the local with the corresponding updated shared configuration parameters.

[0105] In one embodiment, the device newly added module 504 is also used to send a configuration file to the target device, so that the target device replaces the local historical configuration file with the configuration file after successful reception, and performs parameter verification on the configuration file after restarting, and resets the target configuration parameters in the configuration file that exceed the preset configuration range to the historical configuration parameters.

[0106] Each module in the above configuration parameter synchronization device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0107] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a configuration parameter synchronization method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0108] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0109] In an exemplary embodiment, in one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0110] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0111] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0112] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0113] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0114] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0115] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A configuration parameter synchronization method, characterized in that: Applied to the current source device, the method includes: Acquire a target device set, the target device set being obtained by the current source device sending a device search signal to a local area network of a current area, based on target devices corresponding to each configuration parameter acquisition request returned in response to the device search signal, the configuration parameter acquisition request being used to generate a configuration synchronization queue including device information corresponding to the target device; In the process of synchronizing configuration parameters to target devices in the target device set based on the configuration file, when a current target device that has completed configuration parameter synchronization is detected, the current target device that has completed configuration parameter synchronization is used as a newly added source device, including: sending the configuration file to the target device, the configuration file including the target device model, so that when the local device model of the target device does not meet the target device model, based on the configuration relationship between the local device model and the target device model, the shared configuration items and the non-shared configuration items are determined in the configuration file; the updated configuration parameters corresponding to the shared configuration items are obtained from the configuration file, and the updated configuration parameters corresponding to the non-shared configuration items are obtained from the configuration management end; the historical configuration parameters of the shared configuration items and the non-shared configuration items in the local area are replaced with the corresponding updated shared configuration parameters; The sending of the configuration file to the target device, wherein the target device stores an asymmetric encryption public key and an asymmetric encryption private key, comprises: encrypting a configuration parameter key based on the asymmetric encryption public key sent by the target device to obtain encrypted data; sending the encrypted data to the target device, so that the target device decrypts the encrypted data based on the stored asymmetric encryption private key to obtain the configuration parameter key; encrypting the configuration file based on the configuration parameter key to obtain an encrypted file; and sending the encrypted file to the target device, so that the target device decrypts the encrypted file based on the configuration parameter key to obtain the configuration file; Dividing the target devices in the target device set that have not started configuration parameter synchronization to obtain a first processing device set corresponding to the current source device and a second processing device set corresponding to the newly added source device; Based on the configuration file, continue to synchronize configuration parameters to the target devices in the first processing device set, and allocate the configuration parameter synchronization authority corresponding to the second processing device set to the newly added source device, including: based on the configuration synchronization queue, sending the device information of each target device in the second processing device set to the newly added source device, the device information including the configuration parameter key, so that the newly added source device communicates with the target devices in the second processing device set based on the device information and sends the local configuration file to synchronize the configuration parameters to the target devices in the second processing device set; the newly added source device is also used to encrypt and transmit the configuration parameter key to the corresponding target device based on a new asymmetric encryption public key and a new asymmetric encryption private key, the new asymmetric encryption private key is used for encryption, and the new asymmetric encryption public key is used for decryption.

2. The method according to claim 1, characterized in that After acquiring the target device set, the method further includes: Sending a source device address of the current source device to a target device in the target device set, and receiving target identity authentication information sent by the target device based on the source device address; When the target identity authentication information is verified based on the local identity authentication information, the current device version information is sent to the target device, so that the target device performs version matching on the current device version information based on the local device version information; A configuration parameter acquisition request sent by the target device when version matching is successful is received, and a configuration file is sent to the target device, so that the target device synchronizes configuration parameters based on the configuration file.

3. The method according to claim 2, characterized in that The configuration parameter acquisition request carries an asymmetric encryption public key stored in a target device in the target device set.

4. The method according to claim 1, characterized in that: After acquiring the target device set, the method further includes: Sending a version query instruction to a target device in the target device set, and obtaining local device version information returned by the target device based on the version query instruction; Sending a configuration file to a normal target device corresponding to the local device version information that successfully matches the current device version information, so that the normal target device synchronizes configuration parameters based on the configuration file; A version update data packet is sent to a suspended target device corresponding to the local device version information that fails to match the current device version information, so that the suspended target device performs version update based on the version update data packet.

5. The method according to claim 1, characterized in that The process of synchronizing configuration parameters to the target devices in the target device set based on the configuration file includes: The configuration file is sent to the target device so that the target device replaces the local historical configuration file with the configuration file after successful reception, and performs parameter verification on the configuration file after restarting, and resets the target configuration parameters in the configuration file that exceed the preset configuration range to the historical configuration parameters.

6. The method according to claim 1, characterized in that The shared configuration items include screen brightness, prompt duration, and running speed shared between different target device models; the non-shared configuration items include robot work items corresponding to different target device models.

7. A configuration parameter sharing device, characterized in that: The device comprises: A device acquisition module, used to acquire a target device set, wherein the target device set is obtained by sending a device search signal from the current source device to the local area network of the current area, based on the target devices corresponding to each configuration parameter acquisition request returned in response to the device search signal, wherein the configuration parameter acquisition request is used to generate a configuration synchronization queue including device information corresponding to the target devices; A device adding module, used for, in the process of synchronizing configuration parameters to the target devices in the target device set based on the configuration file, when a current target device that has completed configuration parameter synchronization is detected, taking the current target device that has completed configuration parameter synchronization as a newly added source device, comprising: sending the configuration file to the target device, the configuration file including the target device model, so that when the local device model of the target device does not meet the target device model, the shared configuration items and the non-shared configuration items are determined in the configuration file based on the configuration relationship between the local device model and the target device model; obtaining the updated configuration parameters corresponding to the shared configuration items from the configuration file, and obtaining the updated configuration parameters corresponding to the non-shared configuration items from the configuration management end; replacing the historical configuration parameters of the shared configuration items and the non-shared configuration items in the local with the corresponding updated shared configuration parameters; The newly added module of the device is further used to encrypt the configuration parameter key based on the asymmetric encryption public key sent by the target device to obtain encrypted data; send the encrypted data to the target device so that the target device decrypts the encrypted data based on the stored asymmetric encryption private key to obtain the configuration parameter key; encrypt the configuration file based on the configuration parameter key to obtain an encrypted file; send the encrypted file to the target device so that the target device decrypts the encrypted file based on the configuration parameter key to obtain the configuration file; A device division module, used for dividing the target devices in the target device set that have not started configuration parameter synchronization, to obtain a first processing device set corresponding to the current source device and a second processing device set corresponding to the newly added source device; The authority allocation module is used to continue synchronizing configuration parameters to the target devices in the first processing device set based on the configuration file, and allocate the configuration parameter synchronization authority corresponding to the second processing device set to the newly added source device, including: sending the device information of each target device in the second processing device set to the newly added source device based on the configuration synchronization queue, the device information including the configuration parameter key, so that the newly added source device communicates with the target devices in the second processing device set based on the device information and sends the local configuration file to synchronize the configuration parameters to the target devices in the second processing device set; the newly added source device is also used to encrypt and transmit the configuration parameter key to the corresponding target device based on a new asymmetric encryption public key and a new asymmetric encryption private key, the new asymmetric encryption private key is used for encryption, and the new asymmetric encryption public key is used for decryption.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Node management method, device and equipment and computer readable storage medium

    CN115102966A

  • Server node configuration method and device, computer and storage medium

    CN118075105A