A configuration information synchronization method and a readable storage medium

By adaptively adjusting the data transmission method and selecting a reasonable configuration information format based on the device's capabilities, the problem of processing failures caused by offline devices in the Internet of Things (IoT) is solved, thereby improving synchronization efficiency and device resource utilization.

CN122120137APending Publication Date: 2026-05-29TP-LINK

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TP-LINK
Filing Date
2026-02-11
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In the Internet of Things (IoT), when a device goes offline due to network instability or weak signal, the server cluster sends out too much status data, causing the device to fail to process.

Method used

Based on the target device's capabilities, the system selects to send either complete or abbreviated device configuration information. By acquiring the device capability set information and the size of the configuration information, it adjusts the data transmission method to avoid device processing failures.

Benefits of technology

Reduce the probability of equipment processing failure, shorten synchronization time, reduce synchronization latency, and improve synchronization performance and equipment resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122120137A_ABST
    Figure CN122120137A_ABST
Patent Text Reader

Abstract

The application provides a configuration information synchronization method and a readable storage medium. The method comprises the following steps: if it is determined that the size of the configuration information is less than or equal to the device capability of a target device, or a first configuration acquisition request sent by the target device is received, the configuration information is sent to the target device; if it is determined that the size of the configuration information is greater than the device capability of the target device, or a second configuration acquisition request sent by the target device is received, brief information is sent to the target device; the first configuration acquisition request and the second configuration acquisition request are determined by the target device according to the device capability and the size of the configuration information. According to the application, the complete format device configuration or the brief format device configuration is adaptively selected according to the capability of the target device, so that the situation that the device fails to process is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of Internet of Things (IoT) technology, and in particular relates to a configuration information synchronization method and a readable storage medium. Background Technology

[0002] In the Internet of Things (IoT), users send commands to devices via server clusters using terminals. During actual use, devices may become offline or disconnected due to network instability, weak signals, or other factors, causing user commands to fail.

[0003] To ensure successful user operations, a device shadow function is provided through a server cluster to cache user-issued commands. Once the device is online, the modified status data is synchronized to the device, so that users do not need to pay attention to whether the device is online or not.

[0004] However, if the data sent by the server cluster to the device is too large during the process of synchronizing the modified status data to the device, it may cause the device to fail to process. Summary of the Invention

[0005] This application provides a configuration information synchronization method, server cluster, electronic device, and readable storage medium, which can solve the problem that the device processing fails due to excessively large modified status data synchronized to the device.

[0006] In a first aspect, embodiments of this application provide a configuration information synchronization method, including:

[0007] Obtain the configuration information of the target device; If it is determined that the size of the configuration information is less than or equal to the device capability of the target device, or if a first configuration acquisition request is received from the target device, then the configuration information is sent to the target device. The first configuration acquisition request is used to acquire the device configuration in a complete format. If it is determined that the size of the configuration information is greater than the device capability of the target device, or if a second configuration acquisition request is received from the target device, then a simplified information is sent to the target device. The second configuration acquisition request is used to acquire a simplified device configuration, and the first configuration acquisition request and the second configuration acquisition request are determined by the target device based on the device capabilities and the size of the configuration information.

[0008] In some embodiments, after sending the abbreviated information to the target device, the method further includes: Receive a pull request returned by the target device, the pull request being generated by the target device after determining a threshold for the amount of data to be pulled in a single instance based on the simplified information and the device's capabilities; In response to the pull request, target data is sent to the target device, the size of the target data being less than or equal to the data volume threshold.

[0009] In some embodiments, before determining that the size of the configuration information is less than or equal to the device capability of the target device, the method further includes: Query the capability set information of the target device; Determine the capability set limitation value of the target device based on the capability set information; The device capability is determined based on the capability set limit value of the target device.

[0010] In some embodiments, the configuration information includes configuration values ​​corresponding to at least one changed configuration item, and the simplified information includes the size of the configuration value corresponding to at least one of the changed configuration items.

[0011] Secondly, embodiments of this application provide a configuration information synchronization method, including: If a configuration change is detected and it is determined that capability set restrictions are not supported, a first configuration retrieval request is sent to the server cluster. The first configuration retrieval request is used to obtain the device configuration in full format. Receive configuration information returned by the server cluster; If a configuration change is detected and it is determined that the supported capability set is limited, a second configuration retrieval request is sent to the server cluster. The second configuration retrieval request is used to obtain the device configuration in a simplified format. Receive brief information returned by the server cluster.

[0012] In some embodiments, after receiving the simplified information returned by the server cluster, the method further includes: Based on the brief information and device capabilities, a threshold for the amount of data to be fetched in a single transaction is determined, and a fetch request is generated accordingly. Send the pull request to the server cluster; Receive target data returned by the server cluster, wherein the size of the target data is less than or equal to the data volume threshold.

[0013] In some embodiments, determining the number of configuration change items to be pulled in a single operation based on the simplified information and device capabilities includes: When the configuration value corresponding to a single configuration change item is greater than the device capacity, the data volume threshold for a single pull is determined based on the device capacity. When the configuration value corresponding to a single configuration change item is less than or equal to the device capacity, the data volume threshold for a single fetch is determined based on the configuration value corresponding to the single configuration change item. When the configuration values ​​corresponding to multiple configuration change items are less than or equal to the device capacity, the data volume threshold for a single fetch is determined based on the configuration values ​​corresponding to the multiple configuration change items. The abbreviated information includes the size of the configuration value corresponding to at least one of the changed configuration items.

[0014] Thirdly, embodiments of this application provide a server cluster including at least one computing node, a storage node, and a computer program stored in the storage node and executable on the computing node, characterized in that the computing node executes the computer program to implement the method as described in any one of the first aspects above.

[0015] Fourthly, according to an embodiment of this application, an electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method as described in any one of the second aspects above.

[0016] Fifthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method as described in either the first or second aspect above.

[0017] The beneficial effects of the embodiments in this application compared with the prior art are: In this embodiment, if the size of the configuration information is determined to be less than or equal to the device capability of the target device, or if a first configuration acquisition request is received from the target device, configuration information is sent to the target device. The first configuration acquisition request is used to acquire the device configuration in full format. If the size of the configuration information is determined to be greater than the device capability of the target device, or if a second configuration acquisition request is received from the target device, abbreviated information is sent to the target device. The second configuration acquisition request is used to acquire the device configuration in abbreviated format. The first and second configuration acquisition requests are determined by the target device based on its device capability. This allows the target device to select a reasonable transmission method based on its capability, adaptively selecting to send either the full or abbreviated device configuration to the target device, thus reducing the possibility of device processing failures.

[0018] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of a system provided in an embodiment of this application; Figure 2 This is a schematic diagram of the first flowchart of a configuration information synchronization method provided in an embodiment of this application; Figure 3 This is a schematic diagram of the second process of the configuration information synchronization method provided in one embodiment of this application; Figure 4 This is a schematic diagram of the third process of the configuration information synchronization method provided in one embodiment of this application; Figure 5 This is a schematic diagram of the fourth process of the configuration information synchronization method provided in one embodiment of this application. Detailed Implementation

[0021] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0022] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0023] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0024] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0025] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0026] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0027] Figure 1 This is a schematic diagram of a system provided in one embodiment of this application. For example... Figure 1 As shown, the system includes device 10, server cluster 11 and application terminal 12. Device 10 and application terminal 12 communicate with server cluster 11 via wireless network.

[0028] In the Internet of Things (IoT), users send commands to devices via server clusters using terminals. During actual use, devices may become offline or disconnected due to network instability, weak signals, or other factors, causing user commands to fail.

[0029] For example, in a smart home scenario, a user generates a command through a terminal application: "Turn on the living room air conditioner and set the temperature to 26°C." The user sends the command to the air conditioner via a server cluster through the terminal. However, due to network instability, weak signal, or other reasons, the air conditioner may be offline or disconnected, preventing it from receiving the command and causing the command to fail.

[0030] To ensure successful user operations, a device shadow function is provided through a server cluster to cache user-issued commands. Once the device is online, the modified status data is synchronized to the device, so that users do not need to pay attention to whether the device is online or not.

[0031] For example, the first device shadow solution involves setting up device shadows on the cloud platform. When a device changes status, it proactively reports this to the cloud platform to synchronize with the device shadow. When a user sends a request to retrieve device status through a terminal application, regardless of the number of requests or whether the device is online or offline, the current status information of the device can be obtained from the device shadow. When the device is online, instructions can be directly obtained from the cloud platform. When the device is offline, the device shadow stores the instructions and timestamps issued by the application. After the device comes online, the instructions are retrieved from the device shadow, and the execution is determined based on the timestamp. The cloud platform returns the execution result to the application after receiving it.

[0032] The second device shadowing solution involves setting up device shadows in the cloud. When a device changes its state, it proactively reports this to the cloud to synchronize with the device shadow. When a user's application uses the terminal, it retrieves the device's current state information from the device shadow via API. When the device is online, the cloud pushes a message to the device, notifying it to execute the state change. When the device is offline, the device shadow stores the instructions and timestamps issued by the application. Upon the device coming online, it retrieves the instructions from the device shadow and determines whether to execute them based on the timestamps. The cloud receives the execution result from the device via push notification and returns it to the application.

[0033] However, if the data sent by the server cluster to the device is too large during the process of synchronizing the modified status data to the device, it may cause the device to fail to process.

[0034] Specifically, firstly, when the configuration changes exceed the device's capabilities, such as due to device memory issues, the device may fail to process the changes.

[0035] Second: When the configuration changes are too large, resulting in excessively long synchronization time, such as interface timeout or excessively high synchronization latency, the device may fail to process the changes.

[0036] This application provides a configuration information synchronization method applied to a server cluster, which adaptively adjusts the amount of data sent according to the device capabilities of the target device, thereby reducing the occurrence of device processing failures.

[0037] Figure 2 This is a schematic diagram of the first flowchart of a configuration information synchronization method provided in an embodiment of this application. For example... Figure 2 As shown, the method includes: S11: Obtain the configuration information of the target device.

[0038] Users modify the device status of a target device using the terminal application via the API (Application Programming Interface) provided by the server cluster. Upon receiving the corresponding status modification request, the server cluster responds by determining the device changes and obtaining the configuration information. The server cluster then stores this configuration information in the device shadow in the database.

[0039] In some implementations, the server cluster can be a cloud platform, the cloud itself, etc.

[0040] S12: If it is determined that the size of the configuration information is less than or equal to the device capability of the target device, or if a first configuration acquisition request is received from the target device, then the configuration information is sent to the target device.

[0041] In this embodiment of the application, the first configuration acquisition request is used to obtain the device configuration in full format.

[0042] When the target device configuration is changed, it is determined whether the target device can process the configuration information in a single transaction based on the size of the configuration information and the device capability of the target device. If it can process the configuration information, the device configuration method of issuing the complete format is adaptively selected.

[0043] In real-world scenarios, the distribution method can be determined by the server cluster or the target device itself, depending on the actual needs.

[0044] In some scenarios, such as when the device is online, the server cluster can determine the device capabilities of the target device based on the device information stored in the device shadow, compare the size of the configuration information with the device capabilities of the target device, determine whether the configuration information exceeds the limit, and adaptively select the distribution method.

[0045] If the size of the configuration information is less than or equal to the device capability of the target device, it means that the target device can handle the currently modified configuration changes. The target device can receive the complete device configuration without splitting or trimming the configuration information. Send the complete configuration information to the target device.

[0046] In some implementations, the device capability can be defined as the single-processing capacity. This can be determined by comparing the length of the configuration information with the single-processing capacity of the target device to see if the configuration information exceeds the limit. Different capabilities can be selected as filtering and judgment criteria based on the actual business scenario requirements.

[0047] As an example, the obtained device capability characterization shows that the maximum configuration block that the target device can receive at one time is 4096 bytes, and the size of the configuration information is 3180 bytes. It is determined that the size of the configuration information is less than the device capability of the target device, and the configuration information does not exceed the limit.

[0048] In some embodiments, prior to step S12, the method further includes: S21: Query the capability set information of the target device.

[0049] When the target device first connects to the server cluster, it reports its own capability set information and stores the capability set information in the corresponding device shadow. The server cluster retrieves the target device's capability set information from the device shadow.

[0050] Capability set information describes various types of capabilities of the device. For example, capability set information can describe the device's hardware capabilities, such as physical memory capacity and other hardware features. Capability set information can also describe the device's dynamic capabilities, such as current CPU utilization, remaining battery power, and current network bandwidth.

[0051] As an example, capability set information includes the maximum acceptable length of a single frame message, the highest frequency of sampling, triggering, and reporting, the device's currently available dynamic memory, and the single-processing capacity, etc.

[0052] S22: Determine the capability set limit value of the target device based on the capability set information.

[0053] The server cluster selects the single-time configuration data processing capability threshold of the target device from the capability set information based on the actual application scenario requirements, and then determines the capability set limit value.

[0054] Among them, the capability set limit value is a soft capability value set by the server cluster for the device. The capability set limit value is less than the maximum capability value and is used to intercept configurations that may cause problems in device processing at the server cluster in advance.

[0055] S23: Determine the equipment capability based on the capability set limit values ​​of the target equipment.

[0056] In some embodiments, the capability set limit value of the target device can be used to characterize the device capability.

[0057] In some embodiments, a single configuration data processing capability threshold for the target device can be selected to characterize the device capability.

[0058] In some scenarios, such as when the device is offline, the target device can compare the size of the configuration information with its own capabilities to determine whether the configuration information exceeds the limit, adaptively select the distribution method, and inform the server cluster of the required distribution method by requesting it.

[0059] If the target device determines that the size of the configuration information is less than or equal to its device capabilities, it means that the target device can handle the currently modified configuration changes. The target device can receive the complete device configuration without needing to split or trim the configuration information. Accordingly, it generates a first configuration retrieval request; that is, the first configuration retrieval request is determined by the target device based on its device capabilities and the size of the configuration information. The target device then sends the first configuration retrieval request to the server cluster.

[0060] S13: If it is determined that the size of the configuration information is greater than the device capability of the target device, or if a second configuration acquisition request is received from the target device, then a simplified information is sent to the target device.

[0061] In this embodiment of the application, the second configuration acquisition request is used to obtain a simplified format of the device configuration.

[0062] When the target device configuration is changed, it is determined whether the target device can process the configuration information in a single transaction based on the size of the configuration information and the device capability of the target device. If it cannot process the configuration information, a simplified device configuration method is adaptively selected to be issued.

[0063] In some scenarios, the server cluster compares the size of the configuration information with the device capabilities of the target device. If the size of the configuration information is greater than the device capabilities of the target device, it means that the target device cannot process the currently modified configuration changes. The target device can receive the simplified device configuration and send simplified information to the target device.

[0064] In some scenarios, the target device compares the size of the configuration information with its own capabilities. If the size of the configuration information exceeds the target device's capabilities, it means the target device cannot handle the currently modified configuration. In this case, the target device can accept a simplified configuration format and generates a second configuration retrieval request. That is, the second configuration retrieval request is determined by the target device based on its capabilities and the size of the configuration information. The target device then sends the second configuration retrieval request to the server cluster.

[0065] The size of the configuration information is determined based on the number of configuration items to be changed and the size of the configuration value of each configuration item.

[0066] The abbreviated information is obtained by compressing and / or extracting key information from the configuration information. The content of the abbreviated information can be set according to the actual business scenario requirements.

[0067] In some embodiments, the configuration information includes the configuration value corresponding to at least one changed configuration item, and the simplified information includes the size of the configuration value corresponding to at least one changed configuration item.

[0068] The complete configuration information includes the changed configuration item and its configuration value, i.e., the specific value of the configuration. Conversely, the abbreviated information includes the changed configuration item and its configuration value, but does not include the specific value of the changed configuration item.

[0069] As an example, the configuration information is alias: AB-CDEF270, and the configuration item "alias" and configuration value "AB-CDEF270" are changed. The corresponding simplified information is alias: {length: 10}, and the configuration item "alias" and configuration value size "length: 10" are changed.

[0070] In this embodiment, if the size of the configuration information is determined to be greater than or equal to the device capability of the target device, or if a first configuration acquisition request is received from the target device, configuration information is sent to the target device. The first configuration acquisition request is used to acquire the device configuration in full format. If the size of the configuration information is determined to be less than or equal to the device capability of the target device, or if a second configuration acquisition request is received from the target device, abbreviated information is sent to the target device. The second configuration acquisition request is used to acquire the device configuration in abbreviated format. The first and second configuration acquisition requests are determined by the target device based on its device capability. This allows the target device to select a reasonable transmission method based on its capability, adaptively selecting to send either the full or abbreviated device configuration to the target device, thus reducing the possibility of device processing failures.

[0071] Understandably, selecting a reasonable transmission method based on the capabilities of the target device, and adaptively choosing to send either a complete or abbreviated device configuration to the target device to transmit data, can shorten synchronization time and reduce the occurrence of excessive synchronization latency.

[0072] In some embodiments, Figure 3 This is a schematic diagram of the second flowchart of a configuration information synchronization method provided in an embodiment of this application. For example... Figure 3 As shown, when the server cluster sends out simplified information, after step S13, the following steps are also included: S14: Receive the pull request returned by the target device.

[0073] In this embodiment of the application, the fetch request is generated by the target device after determining the data volume threshold for a single fetch based on the simplified information and device capabilities.

[0074] In some implementations, when the server cluster sends out simplified information, the target device analyzes this simplified information to obtain the configuration details. Based on the simplified information, the target device calculates the configuration values ​​for different numbers of configuration change items. Then, it compares these values ​​with the device's capabilities to determine the amount of data the target device can process at a time, thereby determining the threshold for the amount of data to be fetched in a single operation and generating a fetch request. The target device then sends the fetch request to the server cluster, which receives it.

[0075] When the configuration value corresponding to a single configuration change item is greater than the device capacity of the target device, the data volume threshold for a single pull is determined based on the device capacity of the target device.

[0076] When the configuration value corresponding to a single configuration change item is less than or equal to the device capacity of the target device, the data volume threshold for a single pull is determined based on the configuration value corresponding to the single configuration change item.

[0077] When the configuration values ​​corresponding to multiple configuration change items are less than or equal to the device capacity of the target device, the data volume threshold for a single pull is determined based on the configuration values ​​corresponding to the multiple configuration change items.

[0078] S15: In response to the pull request, send the target data to the target device.

[0079] The size of the target data is less than or equal to the data volume threshold.

[0080] The server cluster responds to the pull request and obtains the threshold of the amount of data to be pulled by the target device in a single pull.

[0081] When the data volume threshold for a single fetch is less than the configuration value corresponding to a single configuration change item, the server cluster paginates the configuration value corresponding to the single configuration change item into multiple pages of data, based on the single fetch data volume threshold. The size of each page is less than or equal to the single fetch data volume threshold. Then, the server cluster sends the target data: a single page of data, to the target device. The target device retrieves the data in multiple steps and then integrates the multiple pages of data into the complete content of a single configuration change item.

[0082] In some implementations, pagination can be performed using cursor pagination.

[0083] When the data volume threshold for a single pull is greater than or equal to the configuration value corresponding to a single configuration change item, the server cluster then sends the target data to the target device: the configuration value corresponding to the single configuration change item.

[0084] When the data volume threshold for a single pull is greater than or equal to the configuration value corresponding to multiple changed configuration items, the server cluster then sends the target data to the target device: the configuration values ​​corresponding to the multiple changed configuration items.

[0085] The target device retrieves all changed configuration items and merges them to obtain the complete configuration information.

[0086] In this embodiment, in response to a pull request, target data is sent to the target device. The size of the target data is less than or equal to a data volume threshold. The pull request is generated by the target device after determining the data volume threshold for a single pull based on simplified information and device capabilities. The size of the content sent in a single pull is adaptively adjusted according to the target device's own situation, and the page size is automatically adjusted to ensure successful transmission while making the size of the content sent in a single pull close to the upper limit of the device's capabilities. This maximizes the utilization of the target device's own resources, so that no additional adjustments are needed when connecting a new device, and reduces the number of interactions with the target device, thereby improving synchronization performance.

[0087] In some embodiments, the method further includes: S31: Receive a request to obtain status information for the target device.

[0088] Users can obtain device status information of the target device through the API provided by the server cluster using the terminal application.

[0089] S32: In response to a status information retrieval request, retrieve the status information of the target device from the device shadow of the target device and return the status information.

[0090] When the server cluster receives the corresponding status information retrieval request, it responds by retrieving the status information of the target device from the device shadow in the database and returning the status information to the user's terminal.

[0091] In this embodiment of the application, when the target device changes its state, it sends state information to the server cluster, and the server cluster stores the state information in the device shadow.

[0092] In this embodiment, the target device's status information is obtained from the target device's device shadow in response to a status information acquisition request, and the status information is returned. When the target device's status changes, it sends status information to the server cluster, and the server cluster stores the status information in the device shadow, so that the target device's status can be obtained through the shadow device whether the target device is online or offline.

[0093] This application provides a configuration information synchronization method applied to electronic devices. It adaptively adjusts the amount of data sent based on the device's own capabilities, reducing the occurrence of device processing failures, and provides multiple configuration request methods to achieve decoupling between the platform and the device.

[0094] Figure 4This is a schematic diagram of the third process of the configuration information synchronization method provided in one embodiment of this application. For example... Figure 4 As shown, the method includes: S41: If a configuration change is detected and it is determined that capability set restrictions are not supported, a first configuration retrieval request is sent to the server cluster.

[0095] In this embodiment of the application, the first configuration acquisition request is used to obtain the device configuration in full format.

[0096] In some implementations, after a user modifies the device state of a target device using an application on the terminal via an API provided by the server cluster, the server cluster can send a notification so that the target device can detect the configuration change.

[0097] When a configuration change is detected, the system queries its own capability set information. If no capability set limit value is found for the target device, it is determined that the target device does not support capability set restrictions. This means that the target device can process the currently modified configuration changes in a single transaction, and can receive the complete device configuration without splitting or trimming the configuration information. A first configuration retrieval request is then generated. The target device sends the first configuration retrieval request to the server cluster.

[0098] S42: Receive configuration information returned by the server cluster.

[0099] In response to the first configuration retrieval request received, the server cluster sends out the complete device configuration. The target device receives the configuration information.

[0100] S43: If a configuration change is detected and it is determined that the capability set is limited, a second configuration retrieval request is sent to the server cluster.

[0101] In this embodiment of the application, the second configuration acquisition request is used to acquire a simplified format device configuration. When a configuration change is detected, the system queries its own capability set information. If the target device's capability set limit is found, it is determined that the target device supports capability set limits. This means that the target device may not be able to process the currently modified configuration changes in a single instance. The target device can accept abbreviated device configuration formats and generates a second configuration retrieval request accordingly. The target device then sends the second configuration retrieval request to the server cluster.

[0102] S44: Receive brief information returned by the server cluster.

[0103] In response to the received second configuration retrieval request, the server cluster sends a simplified device configuration. The target device receives the simplified information.

[0104] This embodiment of the application, by detecting a configuration change and determining that capability set restrictions are not supported, sends a first configuration retrieval request to the server cluster; receives configuration information returned by the server cluster; if a configuration change is detected and capability set restrictions are determined to be supported, sends a second configuration retrieval request to the server cluster; and receives simplified information returned by the server cluster, allows the target device to choose a reasonable transmission method based on its own capabilities, adaptively selecting to obtain either the complete or simplified format of the device configuration, reducing the occurrence of device processing failures, and enabling flexible information retrieval, ensuring successful transmission while maximizing the utilization of its own resources.

[0105] It also provides multiple request methods for devices when configuration changes, allowing devices to obtain configuration information by sending a first configuration retrieval request to the server cluster and a second configuration retrieval request to the server cluster to obtain simplified information. This enables devices to obtain device configuration in full or simplified format from the server cluster, allowing devices to choose the distribution method independently and achieve decoupling from the server cluster.

[0106] In some embodiments, Figure 5 This is a schematic diagram of the fourth process of the configuration information synchronization method provided in one embodiment of this application. For example... Figure 5 As shown, when the server cluster sends out simplified information, after step S44, the following steps are also included: S45: Determine the data volume threshold for a single pull based on the brief information and device capabilities, and generate a pull request accordingly.

[0107] In some implementations, step S45 includes: S451: When the configuration value corresponding to a single configuration change item is greater than the device capacity, the data volume threshold for a single pull is determined based on the device capacity.

[0108] S452: When the configuration value corresponding to a single configuration change item is less than or equal to the device capacity, the data volume threshold for a single pull is determined based on the configuration value corresponding to the single configuration change item.

[0109] S453: When the configuration values ​​corresponding to multiple changed configuration items are less than or equal to the device capacity, the data volume threshold for a single pull is determined based on the configuration values ​​corresponding to the multiple changed configuration items.

[0110] The simplified information includes the configuration value size corresponding to at least one changed configuration item. The target device calculates the configuration value sizes for different numbers of changed configuration items based on the number of changed configuration items and their configuration value sizes in the simplified information. It then compares these calculated configuration value sizes with the device's capabilities to determine the upper limit of the data volume that can be fetched in a single instance. This upper limit can be a portion of the content of a single changed configuration item, the complete content of a single changed configuration item, or the complete content of multiple changed configuration items, thus determining the corresponding data volume threshold. The data volume threshold can be set to be less than or equal to the upper limit of the data volume that can be fetched in a single instance. Once the data volume threshold for a single instance is determined, a fetch request is generated accordingly.

[0111] S46: Send a pull request to the server cluster.

[0112] S47: Receive target data returned by the server cluster.

[0113] The size of the target data is less than or equal to the data volume threshold.

[0114] When the data volume threshold for a single fetch is less than the configuration value corresponding to a single configuration change item, the server cluster paginates the configuration value corresponding to the single configuration change item into multiple pages of data, based on the single fetch data volume threshold. The size of each page is less than or equal to the single fetch data volume threshold. Then, the server cluster sends the target data: a single page of data, to the target device. The target device retrieves the data in multiple steps and then integrates the multiple pages of data into the complete content of a single configuration change item.

[0115] When the data volume threshold for a single pull is greater than or equal to the configuration value corresponding to a single configuration change item, the server cluster then sends the target data to the target device: the configuration value corresponding to the single configuration change item.

[0116] When the data volume threshold for a single pull is greater than or equal to the configuration value corresponding to multiple changed configuration items, the server cluster then sends the target data to the target device: the configuration values ​​corresponding to the multiple changed configuration items.

[0117] The target device retrieves all changed configuration items and merges them to obtain the complete configuration information.

[0118] This application embodiment determines the data volume threshold for a single pull based on simplified information and device capabilities, and generates a corresponding pull request; sends the pull request to the server cluster; receives the target data returned by the server cluster, where the size of the target data is less than or equal to the data volume threshold. The target device can automatically adjust the size of the content sent in a single pull according to its own situation, and automatically adjust the page size, ensuring successful transmission while making the size of the content sent in a single pull close to the upper limit of the device's capabilities. This maximizes the utilization of the target device's own resources, eliminates the need for additional adjustments when connecting new devices, reduces the number of interactions with the target device, and improves synchronization performance.

[0119] In some embodiments, the server cluster supports obtaining device configurations in a single batch, compressing the number of requests to the target device, and providing synchronization performance.

[0120] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. Furthermore, the data collection in the above embodiments is compliant, and its use or implementation does not involve any infringement upon public interests.

[0121] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0122] This application also provides a server cluster, including at least one computing node, a storage node, and a computer program stored in the storage node and executable on the computing node, characterized in that the computing node executes the computer program to implement the steps described above in the various method embodiments applied to the server cluster.

[0123] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the steps described above in the various method embodiments applied to the electronic device.

[0124] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps in the above-described method embodiments.

[0125] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some cases, the computer-readable medium cannot be an electrical carrier signal or a telecommunication signal.

[0126] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0127] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0128] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0129] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0130] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for synchronizing configuration information, characterized in that, include: Obtain the configuration information of the target device; If it is determined that the size of the configuration information is less than or equal to the device capability of the target device, or if a first configuration acquisition request is received from the target device, then the configuration information is sent to the target device. The first configuration acquisition request is used to acquire the device configuration in a complete format. If it is determined that the size of the configuration information is greater than the device capability of the target device, or if a second configuration acquisition request is received from the target device, then a simplified information is sent to the target device. The second configuration acquisition request is used to acquire a simplified device configuration, and the first configuration acquisition request and the second configuration acquisition request are determined by the target device based on the device capabilities and the size of the configuration information.

2. The method according to claim 1, characterized in that, After sending brief information to the target device, it also includes: Receive a pull request returned by the target device, the pull request being generated by the target device after determining a threshold for the amount of data to be pulled in a single instance based on the simplified information and the device's capabilities; In response to the pull request, target data is sent to the target device, the size of the target data being less than or equal to the data volume threshold.

3. The method according to claim 1, characterized in that, Before determining that the size of the configuration information is less than or equal to the device capability of the target device, the method further includes: Query the capability set information of the target device; Determine the capability set limitation value of the target device based on the capability set information; The device capability is determined based on the capability set limit value of the target device.

4. The method according to any one of claims 1 to 3, characterized in that, The configuration information includes configuration values ​​corresponding to at least one changed configuration item, and the simplified information includes the size of the configuration value corresponding to at least one of the changed configuration items.

5. A method for synchronizing configuration information, characterized in that, include: If a configuration change is detected and it is determined that capability set restrictions are not supported, a first configuration retrieval request is sent to the server cluster. The first configuration retrieval request is used to obtain the device configuration in full format. Receive configuration information returned by the server cluster; If a configuration change is detected and it is determined that the supported capability set is limited, a second configuration retrieval request is sent to the server cluster. The second configuration retrieval request is used to obtain the device configuration in a simplified format. Receive brief information returned by the server cluster.

6. The method according to claim 5, characterized in that, After receiving the simplified information returned by the server cluster, the process further includes: Based on the brief information and device capabilities, a threshold for the amount of data to be fetched in a single transaction is determined, and a fetch request is generated accordingly. Send the pull request to the server cluster; Receive target data returned by the server cluster, wherein the size of the target data is less than or equal to the data volume threshold.

7. The method according to claim 6, characterized in that, The step of determining the data volume threshold for a single fetch based on the simplified information and device capabilities includes: When the configuration value corresponding to a single configuration change item is greater than the device capacity, the data volume threshold for a single pull is determined based on the device capacity. When the configuration value corresponding to a single configuration change item is less than or equal to the device capacity, the data volume threshold for a single pull is determined based on the configuration value corresponding to the single configuration change item. When the configuration values ​​corresponding to multiple configuration change items are less than or equal to the device capacity, the data volume threshold for a single pull is determined based on the configuration values ​​corresponding to the multiple configuration change items. The abbreviated information includes the size of the configuration value corresponding to at least one of the changed configuration items.

8. A server cluster comprising at least one compute node, a storage node, and a computer program stored in the storage node and executable on the compute node, characterized in that, When the computing node executes the computer program, it implements the method as described in any one of claims 1 to 4.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 5 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 4 or claims 5 to 7.