A configuration delivery method, a configuration processing method, and related devices
Patent Information
- Application Number
- CN202110614559.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-02
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2041-06-02
AI Technical Summary
[0004]但是,因为CDN在进行配置内容传输的过程中,无法针对不同的物联网设备下发不同的配置内容,物联网设备无法准确获取配置内容,而为了解决该问题,传统的配置下发技术需要通过设置专门的推送机制才能保证配置内容准确推送至相应的物联网设备,但是由于每次进行配置内容推送时,都要需要进行专门的推送机制的设计,而推送机制的设计需要耗费的时间和财力成本高,从而导致配置内容推送成本高
[0049]When the first summary information obtained by the target device is inconsistent with the second summary information, the system receives a query configuration request from the target device. The first summary information originates from the device shadow, and the second summary information is generated by the target device based on the original configuration content. The system then sends the obtained query configuration request to the source device, requesting the source device to query the target configuration content, which corresponds to the first summary information. The system then receives the target configuration content from the source device and sends the received target configuration content to the target device. This method utilizes the device shadow to store and transmit the first summary information, assisting the target device in confirming the consistency between the obtained first and second summary information. Even after confirming inconsistency, the system can accurately retrieve the corresponding target configuration content using the first summary information. This not only avoids duplicate or missed transmissions of the same configuration content, ensuring accurate retrieval of the target configuration content and improving the reliability of configuration content distribution, but also eliminates the need for a push mechanism to push the target configuration content to the target device, reducing the cost of configuration content push.
Smart Images

Figure CN115438254B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet of Things (IoT) technology, and in particular to a configuration distribution method, configuration processing method, and related equipment. Background Technology
[0002] A Content Delivery Network (CDN) redirects user requests to the nearest service node by using real-time data on network traffic, node connectivity, load, distance to the user, and response time. This can be understood as resolving network congestion by allowing users to access content from the nearest node, thus improving website response speed.
[0003] Since CDNs are used not only to provide content on computers, but also to provide online data transmission for Internet of Things (IoT) devices such as mobile devices, smart TVs, and set-top boxes, the traditional configuration delivery technology involves the server using a CDN to deliver the configuration content provided by the configuration provider to IoT devices.
[0004] However, because CDNs cannot deliver different configuration content to different IoT devices during the transmission of configuration content, IoT devices cannot accurately obtain the configuration content. To solve this problem, traditional configuration delivery technology requires setting up a dedicated push mechanism to ensure that the configuration content is accurately pushed to the corresponding IoT devices. However, since a dedicated push mechanism needs to be designed every time configuration content is pushed, the design of the push mechanism is time-consuming and costly, resulting in high configuration content push costs. Summary of the Invention
[0005] This application provides a configuration distribution method, a configuration processing method, and related equipment. These methods utilize device shadow storage and transmission of first digest information to assist the target device in confirming whether the obtained first digest information is consistent with second digest information. Even after confirming inconsistency, the method can accurately obtain the corresponding target configuration content through the first digest information. This not only avoids duplicate or missed distribution of the same configuration content, ensuring accurate acquisition of the target configuration content and improving the reliability of configuration content distribution, but also eliminates the need for a push mechanism to push the target configuration content to the target device, thus reducing the cost of pushing configuration content.
[0006] In view of this, this application provides a configuration distribution method, including:
[0007] The configuration distribution platform receives a query configuration request sent by the target device. The query configuration request is sent when the first summary information and the second summary information obtained by the target device are inconsistent. The first summary information comes from the device shadow, and the second summary information is generated by the target device based on the original configuration content.
[0008] The configuration distribution platform sends a query configuration request to the source device. The query configuration request is used to request the source device to query the target configuration content, and the target configuration content has a corresponding relationship with the first summary information.
[0009] Configure the distribution platform to receive the target configuration content sent by the source device;
[0010] The configuration distribution platform sends the target configuration content to the target device.
[0011] This application also provides a configuration processing method, including:
[0012] The target device obtains the first digest information, which originates from the device's shadow.
[0013] The target device retrieves the original configuration content from the local database;
[0014] The target device generates a second summary based on the original configuration.
[0015] If the first summary information is inconsistent with the second summary information, the target device sends a configuration query request to the configuration distribution platform. The configuration query request is used to request the configuration distribution platform to query the target configuration content, and the target configuration content has a corresponding relationship with the first summary information.
[0016] The target device receives the target configuration content sent by the configuration distribution platform.
[0017] Another aspect of this application provides a configuration distribution device, comprising:
[0018] The acquisition unit is used to configure the distribution platform to receive query configuration requests sent by the target device. The query configuration request is sent when the first summary information and the second summary information obtained by the target device are inconsistent. The first summary information comes from the device shadow, and the second summary information is generated by the target device based on the original configuration content.
[0019] The sending unit is used to configure the distribution platform to send a query configuration request to the source device. The query configuration request is used to request the source device to query the target configuration content, and the target configuration content has a corresponding relationship with the first summary information.
[0020] The acquisition unit is also used to configure the distribution platform to receive the target configuration content sent by the source device;
[0021] The sending unit is also used to configure the distribution platform to send target configuration content to the target device.
[0022] In one possible design, in another implementation of the embodiments of this application,
[0023] The acquisition unit is also used to configure the distribution platform to receive configuration distribution requests sent by the source device. The configuration distribution request carries at least a unique device identifier.
[0024] The acquisition unit is also used by the configuration distribution platform to obtain the configuration content to be configured sent by the source device according to the configuration distribution request;
[0025] The generation unit is used to configure the distribution platform to generate a summary of the content to be configured based on the content to be configured.
[0026] The determination unit is used to configure the distribution platform to determine the target device and the device shadow corresponding to the target device based on the device's unique identifier.
[0027] The storage unit is used to configure the distribution platform to use the configuration identifier as the attribute name of the device shadow and the summary of the content to be configured as the first summary information. The configuration identifier corresponds to the source device.
[0028] In one possible design, in another implementation of the embodiments of this application,
[0029] The monitoring unit is used to configure and distribute the reporting attributes in the real-time monitoring device shadows of the distribution platform. The reporting attributes are the current configuration status of the target device reported by the device shadow.
[0030] The output unit is used to output a message indicating successful configuration distribution if the configuration distribution platform detects that the first summary information of the device shadow in the report attribute is consistent with the summary of the target configuration content.
[0031] Another aspect of this application provides a configuration processing apparatus, comprising:
[0032] The acquisition unit is used for the target device to acquire first summary information, which is derived from the device shadow.
[0033] The acquisition unit is also used for the target device to obtain the original configuration content from the local database;
[0034] A generation unit is used by the target device to generate second summary information based on the original configuration content;
[0035] The sending unit is used to send a query configuration request to the configuration distribution platform if the first summary information and the second summary information are inconsistent. The query configuration request is used to request the configuration distribution platform to query the target configuration content, and the target configuration content has a corresponding relationship with the first summary information.
[0036] The acquisition unit is also used for the target device to receive the target configuration content sent by the configuration distribution platform.
[0037] In one possible design, in another implementation of the embodiments of this application,
[0038] Storage unit, used by the target device to store the target configuration content to the local database;
[0039] The detection unit is used to retrieve the target configuration content from the local database and execute the logic in the target configuration content when the target device detects a device shadow or when the configuration distribution platform malfunctions.
[0040] In one possible design, in another implementation of the embodiments of this application,
[0041] The update unit is used by the target device to update the current reporting attributes of the device shadow according to the target configuration content. The reporting attributes are used to store the current configuration status of the target device.
[0042] Another aspect of this application provides a computer device, including: a memory, a transceiver, a processor, and a bus system;
[0043] The memory is used to store programs;
[0044] The processor implements the methods described above when executing a program in memory;
[0045] Bus systems are used to connect memory and processor to enable communication between them.
[0046] Another aspect of this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the methods described above.
[0047] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a network device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the network device to perform the methods provided in the above aspects.
[0048] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0049] When the first summary information obtained by the target device is inconsistent with the second summary information, the system receives a query configuration request from the target device. The first summary information originates from the device shadow, and the second summary information is generated by the target device based on the original configuration content. The system then sends the obtained query configuration request to the source device, requesting the source device to query the target configuration content, which corresponds to the first summary information. The system then receives the target configuration content from the source device and sends the received target configuration content to the target device. This method utilizes the device shadow to store and transmit the first summary information, assisting the target device in confirming the consistency between the obtained first and second summary information. Even after confirming inconsistency, the system can accurately retrieve the corresponding target configuration content using the first summary information. This not only avoids duplicate or missed transmissions of the same configuration content, ensuring accurate retrieval of the target configuration content and improving the reliability of configuration content distribution, but also eliminates the need for a push mechanism to push the target configuration content to the target device, reducing the cost of configuration content push. Attached Figure Description
[0050] Figure 1 This is a schematic diagram of the configuration control architecture in an embodiment of this application;
[0051] Figure 2 This is a schematic diagram of one embodiment of the configuration and distribution method in this application.
[0052] Figure 3 This is a schematic diagram of another embodiment of the configuration and distribution method in this application;
[0053] Figure 4 This is a schematic diagram of another embodiment of the configuration and distribution method in this application;
[0054] Figure 5 This is a schematic diagram illustrating the principle of the configuration and distribution method in this application embodiment;
[0055] Figure 6 This is a schematic diagram of the device shadow configured with the distribution method in the embodiments of this application;
[0056] Figure 7 This is a schematic diagram of one embodiment of the configuration processing method in this application;
[0057] Figure 8 This is a schematic diagram of another embodiment of the configuration processing method in this application;
[0058] Figure 9 This is a schematic diagram of one embodiment of the configuration of the distribution device in this application;
[0059] Figure 10 This is a schematic diagram of one embodiment of the configuration processing device in this application;
[0060] Figure 11 This is a schematic diagram of one embodiment of the computer device described in this application. Detailed Implementation
[0061] This application provides a configuration distribution method that uses device shadow storage and transmission of first digest information to assist the target device in confirming whether the obtained first digest information and second digest information are consistent. After confirming that they are inconsistent, the method can accurately obtain the corresponding target configuration content through the first digest information. This not only avoids the repeated distribution or omission of the same configuration content and achieves accurate acquisition of the target configuration content, thereby improving the reliability of configuration content distribution, but also eliminates the need for a push mechanism to push the target configuration content to the target device, thus reducing the cost of pushing configuration content.
[0062] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0063] It should be understood that the configuration distribution method provided in this application can be applied to various scenarios where different configuration content is pushed to different Internet of Things (IoT) devices. For example, pushing the configuration content for powering on to a set-top box. Another example is pushing the configuration content for changing channels to a smart TV. Yet another example is pushing the configuration content for washing clothes to a smart washing machine. In all these scenarios, in order to complete the configuration content push to IoT devices, the existing solution is to set up a dedicated push mechanism to accurately push the configuration content to the corresponding IoT device. However, since a dedicated push mechanism needs to be designed each time configuration content is pushed, and the design of the push mechanism requires high time and financial resources, the cost of configuration content push is high.
[0064] To address the aforementioned issues, this application proposes a configuration distribution method, which is applied to... Figure 1 Please refer to the configuration control system shown. Figure 1 , Figure 1 The figure shows an architecture diagram of the configuration control system in this application embodiment. When the first summary information and the second summary information obtained by the target device are inconsistent, the configuration distribution platform receives a query configuration request sent by the target device. The first summary information comes from the device shadow, and the second summary information is generated by the target device based on the original configuration content. Then, the configuration distribution platform sends the obtained query configuration request to the source device. The query configuration request is used to request the source device to query the target configuration content, and the target configuration content has a corresponding relationship with the first summary information. Then, the configuration distribution platform receives the target configuration content sent by the source device and sends the received target configuration content to the target device. By using the above method, the target device can be assisted in confirming whether the obtained first digest information is consistent with the second digest information by using device shadow storage and transmission of first digest information. Even if the first digest information is inconsistent, the target configuration content can still be accurately obtained through the first digest information. This not only avoids the duplicate or missed distribution of the same configuration content and achieves accurate acquisition of the target configuration content, thereby improving the reliability of configuration content distribution, but also eliminates the need to design a push mechanism to push the target configuration content to the target device, thus reducing the cost of configuration content push.
[0065] This includes configuring the communication connection between the distribution platform and the target device, and configuring the communication connection between the distribution platform and the source device. Specifically, it should be understood that... Figure 1 The number of target devices, configuration distribution platforms, and source devices shown is only an example and is not intended to limit the number of target devices, configuration distribution platforms, and source devices. The specific number should be determined flexibly based on the actual situation.
[0066] To address the aforementioned issues, this application proposes a configuration distribution method, which is typically executed by a server or terminal device. Accordingly, the configuration distribution device is typically located within the server or terminal device.
[0067] The following section will describe the configuration distribution method in this application. Please refer to [link / reference]. Figure 2 , Figure 5 as well as Figure 6 One embodiment of the configuration and distribution method in this application includes:
[0068] In step S101, the configuration distribution platform receives a query configuration request sent by the target device. The query configuration request is sent when the first summary information obtained by the target device is inconsistent with the second summary information. The first summary information comes from the device shadow, and the second summary information is generated by the target device based on the original configuration content.
[0069] In this embodiment, as Figure 5 As shown, when the target device and the device shadow synchronize data, the data that the target device can synchronize to the device shadow is called the device shadow attribute. The device shadow attribute includes first summary information. The target device can obtain the first summary information of the device shadow. The first summary information is used to represent a summary of a certain configuration content. In this embodiment of the application, it can be used to determine whether the original configuration content in the target device needs to be updated. The original configuration content is the configuration content currently used by the target device.
[0070] When the first summary information obtained from the target device is inconsistent with the second summary information, that is, the first summary information obtained by the target device has changed relative to the second summary information, the second summary information is used to represent the summary of the original configuration content of the target device. It can be understood that the target device needs to update the configuration content, and the target device can send a query configuration request to the configuration distribution platform.
[0071] It is understandable that a configuration distribution platform provides various basic data services such as querying, storage, transmission, monitoring, early warning, analysis, and mining, and uses these as a foundation to quickly build data analysis applications for source and target devices. For example, a configuration distribution platform can provide configuration distribution services to source devices to distribute configuration content sent by the source device to the specified target device. Specifically, a configuration distribution platform can be a Software as a Service (SaaS) platform, an IoT platform, or other platforms such as cloud communications, cloud communication, and traffic distribution platforms; no specific limitations are made here.
[0072] The target device can be a device of the Internet of Things (IoT), or other types of devices, without specific restrictions. IoT devices are those that convert information-based and data-driven devices into network-connected control or monitoring devices. Specific examples of IoT devices include shared power banks, shared umbrellas, shared bicycles, smart ovens, smart coffee machines, smart thermostat systems, smart washing machines, smart dryers, smart lighting fixtures, or cars, etc.
[0073] The Internet of Things (IoT) refers to the use of various information sensors, RFID technology, GPS, infrared sensors, laser scanners, and other devices and technologies to collect real-time data on any object or process that needs to be monitored, connected, or interacted with. This data includes information on sound, light, heat, electricity, mechanics, chemistry, biology, location, and other parameters. Through various possible network access methods, it achieves ubiquitous connectivity between things and between things and people, enabling intelligent perception, identification, and management of objects and processes. The IoT is an information carrier based on the internet and traditional telecommunications networks, enabling all independently addressable ordinary physical objects to form an interconnected network.
[0074] Furthermore, such as Figure 6 As shown, a device shadow is a set of device data cached on the server side. It is usually in the form of a JavaScript Object Notation (JSON) document and is mainly used to store the status reported by the target device or the expected status information carried by the application.
[0075] Each target device has one and only one device shadow. The target device can obtain or set the device shadow through Message Queuing Telemetry Transport (MQTT) and use this to synchronize the status or attributes of the device shadow. This synchronization can be from the shadow to the device or from the device to the shadow.
[0076] Furthermore, the configuration distribution platform can obtain or set device shadows through software development kits (SDKs) or through Hypertext Transfer Protocol over Secure Socket Layer (HTTPS), etc., to obtain the latest device status or a summary of the configuration content to be distributed to the target device.
[0077] Specifically, when the target device is in use, it synchronizes data with its shadow device. The target device can obtain the first summary information of the shadow device. When the first summary information obtained by the target device is inconsistent with the second summary information, that is, the first summary information obtained by the target device has changed relative to the second summary information, it can be understood that the original configuration content of the target device needs to be updated. The configuration content can specifically be system parameters, control commands, or device expected values, etc., without specific restrictions. For example, if the target device has system parameters that need to be updated, such as the device's IP, port number, or serial port parameters, etc., the target device can send a configuration query request to the configuration distribution platform. This allows the source device to remotely distribute configuration content to the target device through the configuration distribution platform to update the target device's system parameters, thereby improving the accuracy of configuration content distribution to a certain extent.
[0078] The specific usage scenarios of the target device can be manifested in smart home scenarios, such as the source device monitoring residents' entry and exit behavior through the door, and combining real-time temperature and time to send target configuration content to the target device through the configuration distribution platform, such as controlling the start or stop of home appliances such as air conditioners, lights, televisions, and speakers. Or it can be a smart car usage scenario, where when the driver wants to turn on the music playback function in the car's music device, the configuration content for starting the music playback function of the source device can be accurately sent to the car's music device through the configuration distribution platform and the music device can be started. It can also be other usage scenarios, without specific restrictions here.
[0079] In step S102, the configuration distribution platform sends a query configuration request to the source device. The query configuration request is used to request the source device to query the target configuration content, and the target configuration content has a corresponding relationship with the first summary information.
[0080] In this embodiment, as Figure 5 As shown, when the configuration distribution platform receives a query configuration request from the target device, the configuration distribution platform can send the query configuration request to the source device to query the configuration content in order to obtain the configuration content that needs to be distributed to the target device. The queried configuration content is called the target configuration content.
[0081] In this context, the source device can specifically be an application, such as a shared bicycle application, a smart home application, or a smart exercise equipment application, etc. There are no specific restrictions here. The source device is the provider of configuration content, that is, the configuration provider. The source device can send configuration content to the target device by calling the configuration sending service of the configuration sending platform. The source device can send configuration content to the target device proactively, or it can send configuration content after receiving a configuration query request.
[0082] Specifically, the configuration distribution platform can send the query configuration request to the source device by using the configuration identifier provided by the configuration distribution platform to the source device to accurately route the query configuration request to the source device, thereby avoiding the loss or incorrect transmission of the query configuration request to other source devices. Alternatively, the query configuration request can be sent using other methods, without specific restrictions. The query configuration request may carry the device identifier of the target device or a summary identifier corresponding to the first summary information, without specific restrictions. The source device can then accurately determine the target configuration content in the source device using the summary identifier in the query configuration request and send the queried target configuration content to the configuration distribution platform. This enables the configuration distribution platform to accurately distribute the target configuration content to the target device, thereby improving the accuracy of target configuration content distribution to a certain extent.
[0083] In step S103, the configuration distribution platform receives the target configuration content sent by the source device;
[0084] In step S104, the configuration distribution platform sends the target configuration content to the target device.
[0085] In this embodiment, as Figure 5 As shown, when the source device retrieves the target configuration content based on the received query configuration request, the source device can send the target configuration content to the configuration distribution platform. The configuration distribution platform can then send the received target configuration content to the target device, enabling the target device to update its configuration content based on the received target configuration content.
[0086] Specifically, the source device sends the retrieved target configuration content to the configuration distribution platform. This can be achieved by using a configuration identifier provided by the platform to the source device, ensuring accurate delivery of the target configuration content and preventing loss. Alternatively, other methods can be used to send the target configuration content; no specific restrictions are placed here. Then, the configuration distribution platform sends the target configuration content to the target device, again using the configuration identifier or device identifier, among other methods, to ensure accurate delivery. This improves the accuracy of target configuration content delivery and eliminates the need for technical personnel to design a dedicated push mechanism for the target device, thereby reducing the cost of configuration content delivery.
[0087] In this embodiment, when the first summary information and the second summary information obtained by the target device are inconsistent, a query configuration request is received from the target device. The first summary information originates from a device shadow, and the second summary information is generated by the target device based on the original configuration content. The obtained query configuration request is then sent to the source device, requesting the source device to query target configuration content, which corresponds to the first summary information. The source device then receives the target configuration content and sends the received target configuration content to the target device. This method utilizes device shadow storage and transmission of the first summary information to assist the target device in confirming whether the obtained first summary information and the second summary information are consistent. Even after confirming inconsistency, the target device can accurately obtain the corresponding target configuration content using the first summary information. This not only avoids duplicate or missed distribution of the same configuration content, ensuring accurate acquisition of the target configuration content and improving the reliability of configuration content distribution, but also eliminates the need for a push mechanism to push the target configuration content to the target device, reducing the cost of configuration content push.
[0088] Optionally, in the above Figure 2 Based on the corresponding embodiments, in another optional embodiment of the configuration distribution method provided in this application, such as... Figure 3 As shown, the method also includes:
[0089] In step S301, the configuration distribution platform receives a configuration distribution request sent by the source device. The configuration distribution request carries at least a unique device identifier.
[0090] In this embodiment, when a user wants to modify the configuration in the target device, or when the source device actively sends configuration content to the target device, the source device can send the configuration content to the target device by calling the configuration sending service of the configuration sending platform. The source device can send a configuration sending request to the configuration sending platform. In order to ensure that the configuration content is accurately sent to the specified target device, a unique device identifier, such as A or B, can be set to specify the target device. The source device can then send the unique device identifier to the configuration sending platform through the configuration sending request.
[0091] Furthermore, since the configuration distribution platform can assign a configuration identifier, such as a key or other identifier, to each configuration provider, i.e. the source device (without specific restrictions), this configuration identifier can be used for mutual indexing between the configuration distribution platform and the source device. Thus, the source device can send a configuration distribution request, which carries at least a unique device identifier, to the configuration distribution platform through the configuration identifier.
[0092] Specifically, when a source device needs to distribute configuration content to a specified target device, the source device can send a configuration distribution request, which carries at least a unique device identifier, to the configuration distribution platform that has assigned a configuration identifier to the source device. This enables the configuration distribution platform to distribute the configuration content to the specified target device based on the unique device identifier, thereby improving the accuracy of configuration content distribution to a certain extent.
[0093] In step S302, the configuration distribution platform obtains the configuration content sent by the source device according to the configuration distribution request;
[0094] In this embodiment, when the configuration distribution platform receives a configuration distribution request from the source device, the configuration distribution request obtains the configuration content to be configured sent by the source device. Specifically, the configuration distribution platform can request the source device to obtain the configuration content corresponding to the unique device identifier carried in the configuration distribution request. At this time, the configuration content corresponding to the unique device identifier is called the configuration content to be configured. The source device then sends the configuration content to be configured corresponding to the unique device identifier to the configuration distribution platform. Alternatively, when the source device sends a configuration distribution request to the configuration distribution platform, it carries the configuration content to be distributed to the target device, i.e., the configuration content to be configured, in the configuration distribution request, so that the configuration distribution platform can obtain the configuration content to be configured from the configuration distribution request when it receives the configuration distribution request. Or, after the source device sends a configuration distribution request to the configuration distribution platform, it sends the configuration content to be distributed to the target device, i.e., the configuration content to be configured, to the configuration distribution platform, so that the configuration distribution platform can obtain the configuration content to be configured after receiving the configuration distribution request. Other acquisition methods are also possible, and no specific restrictions are imposed here.
[0095] In step S303, the configuration distribution platform generates a summary of the content to be configured based on the content to be configured;
[0096] In step S304, the configuration distribution platform determines the target device and the device shadow corresponding to the target device based on the device's unique identifier;
[0097] In this embodiment, if the configuration distribution platform directly sends the configuration content to the target device after obtaining it, there may be a situation where the configuration content in the target device is the same as the configuration content to be configured, which may easily lead to the duplicate distribution of the same configuration content. Alternatively, if the target device is offline, the target device will not receive the configuration content if it is sent directly, resulting in the failure of the configuration content distribution and reducing the accuracy of the configuration content distribution. Therefore, this embodiment uses device shadowing to distribute the configuration content to the target device.
[0098] Furthermore, if the content to be configured is directly stored or set in the device shadow, when the data of the configuration content is large, the synchronization rate of the target device to the device shadow will be slow due to the large amount of data, resulting in reduced configuration distribution efficiency. Alternatively, the size limitation of the device shadow's attributes may prevent the storage of large configuration content, leading to configuration distribution failure. Therefore, this embodiment reduces the data size of the device shadow synchronization by converting the content to be configured into a summary of the configuration content and storing it in the device shadow, thereby improving the synchronization efficiency of the target device without affecting the synchronization of other attributes of the device shadow. It also avoids the size limitation of some device shadow services on the attributes of the device shadow, thus preventing configuration distribution failure.
[0099] Specifically, a digest of the content to be configured is generated based on the content to be configured. This can be achieved by using a digest algorithm to calculate the digest of the content to be configured. The digest algorithm can be Message Digest Algorithm Version 5 (MD5), Secure Hash Algorithm (SHA256), or other digest algorithms. No specific restrictions are imposed here.
[0100] For example, by using the MD5 algorithm to calculate the digest of a piece of content to be configured, a digest smaller than the content data can be obtained, such as "4A318148CFF53E78".
[0101] Furthermore, once the configuration distribution platform receives the unique device identifier sent by the source device, it can quickly find the device corresponding to the unique device identifier, i.e., the target device. Since each target device has one and only one unique corresponding device shadow, once the configuration distribution platform determines the target device through the unique device identifier, it can determine the device shadow corresponding to the target device.
[0102] In step S305, the configuration distribution platform uses the configuration identifier as the attribute name of the device shadow and the summary of the content to be configured as the first summary information, wherein the configuration identifier has a corresponding relationship with the source device.
[0103] In this embodiment, since the configuration distribution platform can obtain or set device shadows through SDK or HTTPS protocol, the configuration distribution platform can use the configuration identifier as the attribute name of the device shadow and the summary of the content to be configured as the attribute content of the device shadow. This attribute content is the first summary information. The attribute name and the first summary information are stored as an attribute of the device shadow, so that the target device can synchronize the attribute after connecting to the network.
[0104] The configuration identifier is an identifier assigned to the source device by the configuration distribution platform. The configuration distribution platform sets the configuration identifier as the attribute name of the device shadow, and can synchronize the configuration identifier to the target device. Since the configuration identifier corresponds to the source device, the target device can accurately query the source device based on the configuration identifier.
[0105] Specifically, after the configuration distribution platform calculates the summary to be configured, it can use the configuration identifier, such as "key", as the attribute name of the device shadow, and the summary of the content to be configured, such as "4A318148CFF53E78", as the first summary information of the device shadow. Then, the configuration distribution platform sets the attribute name and the first summary information as an attribute of the device shadow, such as "config:{key}" and "4A318148CFF53E78". This can effectively reduce the data size of device shadow synchronization, improve the synchronization efficiency of the target device, and thus improve the efficiency of configuration content distribution to a certain extent.
[0106] Optionally, in the above Figure 2 Based on the corresponding embodiments, in another optional embodiment of the configuration distribution method provided in this application, such as... Figure 4 As shown, the method also includes:
[0107] In step S401, the reporting attributes in the real-time monitoring device shadow of the distribution platform are configured, wherein the reporting attributes are the current configuration status of the target device reported by the device shadow;
[0108] In step S402, if the configuration distribution platform detects that the first summary information of the device shadow in the report attribute is consistent with the summary of the target configuration content, it outputs a prompt that the configuration distribution was successful.
[0109] In this embodiment, after the configuration distribution platform sends the target configuration content to the target device, in order to further determine whether the target configuration content has been accurately distributed to the target configuration content, this embodiment can monitor the report attributes in the device shadow in real time through the configuration distribution platform. Then, the configuration distribution platform can determine the current configuration status of the target device based on the current status of the target device reported to the device shadow in the report attributes. Therefore, when the configuration status displayed in the report attributes is that the current first summary information of the device shadow is consistent with the summary of the target configuration content, it can be understood that the configuration distribution platform has accurately distributed the target configuration content corresponding to the first configuration summary information to the target device. In the target device, the configuration distribution platform can send a notification of successful configuration distribution to either the target device or the source device. This notification can be in the form of language, text, or video, without specific limitations. If the configuration status displayed in the report attribute is inconsistent with the current first summary information of the device shadow and the summary of the target configuration content, it can be understood that the target configuration content distributed by the configuration distribution platform to the target device may contain errors or anomalies. In this case, the configuration distribution platform can send a notification of configuration distribution anomaly to either the target device or the source device, so that the source device can repair the target configuration content and re-distribute the configuration content to ensure the accuracy of the target configuration content distribution.
[0110] Among them, such as Figure 6 As shown, the device shadow contains a reported attribute, which stores the status reported by the target device itself. The target device can write data to the document section of the reported attribute of the device shadow to report its real-time configuration status. The configuration distribution platform can obtain the real-time configuration status of the target device by reading the document section of the reported attribute of the device shadow. This allows the configuration distribution platform to monitor the reported attribute in the device shadow in real time to confirm whether the current first summary information of the device shadow is consistent with the summary of the target configuration content. Furthermore, the configuration distribution platform can further determine whether the target configuration content has been accurately distributed to the target device based on the changes in the summary, thereby improving the accuracy of configuration content distribution.
[0111] For example, when the network is unstable, the target device may frequently go online and offline. When the configuration distribution platform wants to obtain the current status of the target device to further ensure that the target configuration content is accurately distributed to the target settings, if the target device is offline, the configuration distribution platform cannot obtain the configuration status of the target device. Or, if the target device suddenly connects to the network after going offline, the target device may not be able to receive the status query request sent by the configuration distribution platform, resulting in the configuration distribution platform being unable to obtain the configuration status of the target device. Therefore, this embodiment can obtain the configuration status of the target device through the device shadow mechanism. Through the reporting attributes of the device shadow, when the configuration status of the target device changes, the target device can synchronize the configuration status to the reporting attributes of the device shadow. This allows the configuration distribution platform to obtain the current status of the target device to further ensure that the target configuration content is accurately distributed to the target settings simply by monitoring the reporting attributes in the device shadow in real time. It does not need to care whether the target device is online or not. It can still determine whether the target configuration content is accurately distributed to the target settings through the configuration status of the target device in the reporting attributes of the device shadow, thereby improving the accuracy of configuration content distribution.
[0112] Furthermore, the device shadow also contains other attributes or states, such as Figure 6 As shown, the device shadow also includes a desired attribute, which stores the expected state of the target device. The configuration distribution platform can write data to this desired attribute's document section, which can be used to update the target device's state. The target device can use the SDK to register relevant attributes or use callback functions to call the device shadow service to synchronize the data in the desired attribute of the device shadow to the target device, thus updating the target device's state. The device shadow also includes a metadata attribute, which stores the device shadow's metadata information, including the last update time of each attribute item in the state section, i.e., the timestamp of each attribute, such as the timestamp of the report attribute or desired attribute. The device shadow also includes a version attribute, which stores the version number of the device shadow document. This version number increments after each update of the device shadow document, ensuring that the data on the target device is consistent with the data in the device shadow. The device shadow also includes a timestamp attribute, which stores the last update time of the device shadow document, i.e., the latest update time of the device shadow document.
[0113] Furthermore, this embodiment can effectively achieve bidirectional data synchronization between the target device and the configuration distribution platform by using device shadowing:
[0114] 1) For configuration changes to the target device, the configuration distribution platform does not need to directly modify the target device. It only needs to modify the attributes in the device shadow corresponding to the target device, and then synchronize the device shadow to the target device. Even if the target device is offline at the time, the latest configuration can still be synchronized from the device shadow after the target device comes online.
[0115] 2) For updates to the target device status, the target device can report the configuration status to the device shadow. When the configuration distribution platform needs to obtain the configuration status of the target device, it only needs to monitor the report attribute in the device shadow to obtain it in real time. This can effectively reduce network interaction between the target device and the configuration distribution platform, especially for low-power target devices, saving resources and thus saving configuration costs to a certain extent.
[0116] The configuration processing method in this application will be described below. Please refer to [link / reference]. Figure 7 One embodiment of the configuration processing method in this application includes:
[0117] In step S701, the target device obtains the first digest information, which originates from the device shadow.
[0118] In this embodiment, since each target device has one and only one unique device shadow, and the device shadow and the target device can synchronize data, when the target device is in a network state, the target device can automatically synchronize the attributes in the device shadow. Therefore, the target device synchronizes the first summary information in the device shadow, as well as the attribute name corresponding to the first summary information, i.e., the configuration identifier.
[0119] It should be noted that when the target device is offline, this embodiment can use the device shadow to achieve offline configuration distribution. Even if the target device is offline, the configuration can still be distributed, and the target device can automatically synchronize the device shadow to obtain the configuration stored in the device shadow after it comes online.
[0120] For example, when the target device's network is unstable, causing frequent online and offline occurrences, if the configuration distribution platform needs to distribute configuration content to the target device while the target device is offline, the distribution will fail. Therefore, this embodiment uses a device shadow storage mechanism. The configuration distribution platform can store the first summary information or other control commands, along with the timestamps of the control commands, in the device shadow. When the target device disconnects and reconnects, it can promptly synchronize the first summary information in the device shadow. Alternatively, the target device can synchronize the control commands in the device shadow and determine whether to execute them based on their timestamps. When the target device goes offline and then comes back online, it can ensure that expired commands or information are not executed or synchronized by synchronizing the information in the device shadow with timestamps.
[0121] In step S702, the target device retrieves the original configuration content from the local database;
[0122] In step S703, the target device generates a second summary information based on the original configuration content;
[0123] In step S704, if the first summary information is inconsistent with the second summary information, the target device sends a query configuration request to the configuration distribution platform. The query configuration request is used to request the source device to query the target configuration content through the configuration distribution platform. The target configuration content has a corresponding relationship with the first summary information.
[0124] In step S705, the target device receives the target configuration content sent by the configuration distribution platform.
[0125] In this embodiment, when the target device is connected to the network, if a configuration acquisition request is sent directly to the configuration distribution platform, the configuration content acquired by the target device may be the same as the current configuration content in the target device, which may lead to the duplicate distribution of the same configuration content and waste of resources. Therefore, this embodiment further determines whether the target device needs to acquire new configuration content by judging whether the original configuration content in the target device needs to be updated, thereby improving the accuracy of configuration content distribution.
[0126] Therefore, after the target device obtains the first summary information, it can determine whether the original configuration content in the target device needs to be updated by obtaining the original configuration content in the local database. In other words, the target device can determine whether it needs to obtain new configuration content by using the original configuration content.
[0127] Furthermore, after the target device obtains the original configuration content, it can use a digest algorithm to calculate a digest of the original configuration content. The digest of the calculated configuration content is the second configuration digest information. The method of calculating the second digest information using a digest algorithm is similar to the method of generating a digest of the content to be configured by the configuration distribution platform in step S303, and will not be described in detail here.
[0128] Furthermore, in this embodiment, determining whether the original configuration content in the target device needs to be updated can specifically be done by determining whether the first summary information obtained by the target device is consistent with the second summary information of the target device. This can be understood as whether the first summary information obtained by the target device has changed relative to the second summary information of the target device.
[0129] Therefore, when the first summary information obtained by the target device is consistent with the second summary information of the target device, that is, the first summary information obtained by the target device has not changed relative to the second summary information of the target device, the target device does not need to obtain new configuration content to update the original configuration content. In this case, the target device can continue to use the original configuration content, and the target device does not need to send a query configuration request to the configuration distribution platform to obtain the target configuration content corresponding to the first summary information.
[0130] For example, if the target device obtains the first digest information as "4A318148CFF53E78" and the target device also obtains the second digest information as "4A318148CFF53E78", then the target device can continue to use the original configuration content and ignore the request to send the configuration content.
[0131] Conversely, when the first summary information obtained by the target device is inconsistent with the second summary information of the target device, that is, when the first summary information obtained by the target device has changed relative to the second summary information of the target device, and the target device needs to obtain new configuration content to update the original configuration content, the target device can send a query configuration request to the configuration distribution platform to obtain the target configuration content corresponding to the first summary information, and receive the target configuration content sent by the configuration distribution platform to realize the distribution of configuration content. This improves the accuracy of configuration content distribution, avoids the situation where the target device repeatedly obtains the same configuration content, avoids the waste of resources, and thus saves the cost of pushing configuration content to a certain extent.
[0132] For example, if the first digest information obtained by the target device is "4A318148CFF53E78" and the second digest information of the target device is "3B571621CDD36F49", the first digest information obtained by the target device is inconsistent with the second digest information of the target device. In this case, the target device can send a query configuration request to the configuration distribution platform to obtain the target configuration content corresponding to the first digest information and receive the target configuration content sent by the configuration distribution platform.
[0133] Furthermore, when the first summary information obtained by the target device is inconsistent with the second summary information of the target device, the target device sends a query configuration request to the configuration distribution platform. The target device can accurately send the query configuration request to the configuration distribution platform to query the target configuration content by using the attribute name corresponding to the first summary information in the synchronized device shadow, i.e., the configuration identifier. This eliminates the need for the target device to poll the configuration distribution platform for the target configuration content through a polling mechanism. The polling mechanism has poor timeliness, with the longest update time being the polling interval. Moreover, obtaining the target configuration content through polling consumes a large amount of the target device's bandwidth, increasing the query cost. In this embodiment, the configuration identifier is used to accurately send the query configuration request to the configuration distribution platform, which can save the target device's bandwidth consumption and reduce the query cost of the configuration content. In addition, the target device can obtain the configuration identifier in a timely manner by synchronizing the attribute name in the device shadow, which has good timeliness and thus improves the efficiency of the target device in obtaining the target configuration content to a certain extent.
[0134] Furthermore, only after the target device confirms that the second summary information of the original configuration content has changed relative to the first summary information obtained by the target device, does the target device send a query configuration request to the configuration distribution platform. This enables the configuration distribution platform to route the received query configuration request to the source device for querying the target configuration content. When the target device sends a query configuration request to the configuration distribution platform based on the configuration identifier, the query configuration request can also bring the target device's current configuration status and configuration information to the server backend. This allows for further confirmation of the target device's configuration status and configuration information to determine whether the target configuration content needs to be obtained, thereby improving the accuracy of the target device in obtaining the target configuration content to a certain extent.
[0135] In this embodiment, when the target device obtains the first digest information (which originates from a device shadow), it can retrieve the original configuration content from its local database and generate a second digest information based on that content. If the first and second digests are inconsistent, the target device can send a configuration query request to the configuration distribution platform to retrieve the target configuration content and receive it. This method utilizes the device shadow to store and transmit the first digest information, assisting the target device in verifying the consistency between the first and second digests. Upon verification of inconsistency, the target device can send a configuration query request to the configuration distribution platform to accurately obtain the corresponding target configuration content. This not only prevents the target device from receiving identical configuration content, ensuring accurate acquisition of the target configuration content and improving its accuracy and reliability, but also eliminates the need for a push mechanism, reducing the cost of configuration content push.
[0136] Optionally, in the above Figure 7 Based on the corresponding embodiments, in another optional embodiment of the configuration distribution method provided in this application, such as... Figure 8 As shown, the method also includes:
[0137] In step S801, the target device stores the target configuration content to the local database;
[0138] In this embodiment, after the target device receives the target configuration content sent by the configuration distribution platform, the target device can first cache the obtained configuration in the local database, and then replace the original configuration content in the local database with the target configuration content obtained by the target device. Then, the target device can execute the corresponding logic according to the received target configuration content.
[0139] In step S802, when the target device detects a device shadow or the configuration distribution platform malfunctions, the target configuration content is retrieved from the local database and the logic in the target configuration content is executed.
[0140] In this embodiment, since the target device can synchronize data with the device shadow, the target device can detect whether the device shadow has malfunctioned through data synchronization. When the target device detects that the device shadow has malfunctioned through data synchronization, the target device can obtain the pre-stored target configuration content from the local data and execute the corresponding logic according to the obtained target configuration content.
[0141] Furthermore, if the target device sends a configuration query request to the configuration distribution platform but cannot receive the target configuration content distributed by the configuration distribution platform, i.e., cannot obtain a response from the configuration distribution platform, then the configuration distribution platform may be faulty or abnormal. Alternatively, if the configuration distribution platform synchronizes its status with the target device through the device shadow, and the target device is faulty or abnormal, the target device can obtain the pre-stored target configuration content from its local database and execute the corresponding logic based on the obtained target configuration content to ensure that the target device continues to operate normally. This can avoid the situation where the target device cannot operate normally when the configuration distribution platform or the device shadow is faulty or abnormal.
[0142] Optionally, in the above Figure 7 Based on the corresponding embodiments, in another optional embodiment of the configuration distribution method provided in this application, the method further includes:
[0143] The target device updates the current reporting attributes of the device shadow based on the target configuration content. The reporting attributes are used to store the current configuration status of the target device.
[0144] In this embodiment, after the target device obtains the target configuration content sent by the configuration distribution platform, the target device can update the report attribute in the device shadow according to the target configuration content.
[0145] Specifically, when the configuration information of the target device changes, i.e., after the target device receives the target configuration content sent by the configuration distribution platform, the target device can write data to the "This Document" section of the report attribute of the device shadow to report the current configuration status of the target device. The target device can use a digest algorithm to calculate a digest of the target configuration content. The calculation method for this digest is similar to the method used to generate the second digest information based on the original configuration content in step S703, and will not be elaborated here. The target device synchronizes the calculated digest of the target configuration content to the report attribute of the device shadow, allowing the configuration distribution platform to obtain the real-time configuration status of the target device by monitoring the report attribute of the device shadow in real time. Furthermore, the configuration distribution platform can also confirm whether the current first digest information of the device shadow is consistent with the digest of the target configuration content by monitoring the report attribute in the device shadow, and can further determine whether the target configuration content has been accurately distributed to the target device based on changes in the digest, thereby improving the accuracy of the target device obtaining the target configuration content to a certain extent.
[0146] The configuration distribution device in this application is described in detail below. Please refer to [link / reference]. Figure 9 , Figure 9 This is a schematic diagram of one embodiment of the configuration and distribution device in this application. The configuration and distribution device 20 includes:
[0147] The acquisition unit 201 is used to receive a query configuration request sent by the target device. The query configuration request is sent when the first summary information and the second summary information obtained by the target device are inconsistent. The first summary information comes from the device shadow, and the second summary information is generated by the target device based on the original configuration content.
[0148] The sending unit 202 is used to send a query configuration request to the source device, wherein the query configuration request is used to request the source device to query the target configuration content, and the target configuration content has a corresponding relationship with the first summary information;
[0149] The acquisition unit 201 is also used to receive the target configuration content sent by the source device;
[0150] The sending unit 202 is also used to send target configuration content to the target device.
[0151] In this embodiment, the target configuration content is distributed by receiving the query configuration request and the target configuration content corresponding to the query configuration request through the acquisition unit 201, and sending the query configuration request and the target configuration content corresponding to the query configuration request through the sending unit 202.
[0152] In this embodiment of the application, the above method enables the acquisition unit 201 to confirm whether the acquired first summary information and the second summary information are consistent. After confirming that they are inconsistent, the sending unit 202 sends a query configuration request to query the target configuration content. The acquisition unit 201 can obtain the target configuration content corresponding to the first summary information. This not only avoids the repeated or missed distribution of the same configuration content and achieves accurate acquisition of the target configuration content, thereby improving the reliability of configuration content distribution, but also eliminates the need to design a push mechanism to push the target configuration content to the target device, thereby reducing the cost of pushing configuration content.
[0153] Optionally, in the above Figure 9 Based on the corresponding embodiments, in another embodiment of the configuration distribution device provided in this application,
[0154] The acquisition unit 201 is also used to receive a configuration distribution request sent by the source device, wherein the configuration distribution request carries at least a unique device identifier;
[0155] The acquisition unit 201 is also used to acquire the configuration content sent by the source device according to the configuration distribution request;
[0156] The generation unit 203 is used to generate a summary of the content to be configured based on the content to be configured.
[0157] The determining unit 204 is used to determine the target device and the device shadow corresponding to the target device based on the device's unique identifier.
[0158] Storage unit 205 is used to use the configuration identifier as the attribute name of the device shadow and the summary of the content to be configured as the first summary information, wherein the configuration identifier has a corresponding relationship with the source device.
[0159] In this embodiment, the acquisition unit 201 acquires the configuration distribution request, the unique device identifier carried in the configuration distribution request, and the configuration content to be configured carried in the configuration distribution request. Then, the generation unit 203 generates a configuration content summary based on the configuration content, and the determination unit 204 determines the target device and the device shadow corresponding to the target device based on the acquired unique device identifier. Finally, the storage unit 205 stores the configuration identifier and the configuration summary, which can reduce the size of the synchronization data and improve the data synchronization rate, thereby improving the efficiency of configuration content distribution to a certain extent.
[0160] Optionally, in the above Figure 9 Based on the corresponding embodiments, in another embodiment of the configuration distribution device provided in this application,
[0161] Monitoring unit 206 is used to monitor the reporting attributes in the device shadow in real time, wherein the reporting attributes are the current configuration status of the target device reported by the device shadow;
[0162] The output unit 207 is used to output a prompt indicating successful configuration delivery if the first summary information of the device shadow in the report attribute is consistent with the summary of the target configuration content.
[0163] In this embodiment, the monitoring unit 206 obtains the reported configuration status information in the report attributes, and then the output unit 207 confirms whether the target configuration content has been successfully distributed based on the obtained report attributes. After confirming that the configuration has been successfully distributed, the output unit 207 outputs a prompt indicating that the configuration has been successfully distributed, thereby improving the accuracy of the configuration content distribution to a certain extent.
[0164] The configuration processing apparatus in this application is described in detail below. Please refer to [link / reference]. Figure 10 , Figure 10 This is a schematic diagram of one embodiment of the configuration processing device in this application. The configuration processing device 30 includes:
[0165] Acquisition unit 301 is used to acquire first summary information, which is derived from the device shadow;
[0166] The acquisition unit 301 is also used to retrieve the original configuration content from the local database;
[0167] The generation unit 302 is used to generate second summary information based on the original configuration content;
[0168] The sending unit 303 is used to send a query configuration request to the configuration distribution platform if the first summary information is inconsistent with the second summary information. The query configuration request is used to request the configuration distribution platform to query the target configuration content, and the target configuration content has a corresponding relationship with the first summary information.
[0169] The acquisition unit 301 is also used to receive the target configuration content sent by the configuration distribution platform.
[0170] In this embodiment, the first summary information and the original configuration content can be obtained by the acquisition unit 301. Then, the second summary information is generated by the generation unit 302 based on the obtained original configuration content. The acquisition unit 301 then confirms whether the obtained first summary information and the second summary information are consistent. If they are inconsistent, a query configuration request is sent by the sending unit 303, and the target configuration content corresponding to the query configuration request is obtained by the acquisition unit 301.
[0171] In this embodiment of the application, the above method enables the acquisition unit 301 to acquire the first summary information and the generation unit 302 to generate the second summary information. Then, the acquisition unit 301 confirms whether the acquired first summary information and the second summary information are consistent. After confirming that they are inconsistent, the corresponding target configuration content is accurately obtained by sending a query configuration request sent by the sending unit 303. This improves the accuracy and reliability of obtaining the configuration content and eliminates the need for a push mechanism to enable the target device to obtain the target configuration content, thereby reducing the cost of pushing configuration content.
[0172] Optionally, in the above Figure 10 Based on the corresponding embodiments, in another embodiment of the configuration processing apparatus provided in this application,
[0173] Storage unit 304 is used by the target device to store the target configuration content to a local database;
[0174] The detection unit 305 is used to retrieve the target configuration content from the local database and execute the logic in the target configuration content when a device shadow is detected or a configuration distribution platform malfunctions.
[0175] In this embodiment, the target configuration content is stored in the storage unit 304, and when the detection unit 305 detects a fault, the target configuration content can be obtained through the detection unit 305 and the logic in the target configuration content can be executed, so that the target configuration content can still be used normally when an abnormality or fault occurs.
[0176] Optionally, in the above Figure 10 Based on the corresponding embodiments, in another embodiment of the configuration processing apparatus provided in this application,
[0177] The update unit 306 is used to update the current reporting attributes of the device shadow according to the target configuration content. The reporting attributes are used to store the current configuration status of the target device.
[0178] In this embodiment, by updating the configuration status in the report attribute through the update unit 306, it is possible to further confirm whether the target configuration content has been successfully distributed based on the obtained report attribute, thereby improving the accuracy of the distribution of configuration content to a certain extent.
[0179] This application also provides a schematic diagram of another computer device, such as... Figure 11 As shown, the processing device for data recovery can be a computer device 400, which can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 410 (e.g., one or more processors) and memory 420, and one or more storage media 430 (e.g., one or more mass storage devices) storing application programs 431 or data 432. The memory 420 and storage media 430 can be temporary or persistent storage. The program stored in the storage media 430 may include one or more modules (not shown in the figure), each module including a series of instruction operations on the computer device 400. Furthermore, the CPU 410 may be configured to communicate with the storage media 430 and execute the series of instruction operations in the storage media 430 on the computer device 400.
[0180] Computer device 400 may also include one or more power supplies 430, one or more wired or wireless network interfaces 450, one or more input / output interfaces 460, and / or one or more operating systems 433, such as Windows Server. TM Mac OS X TM Unix TM Linux TM FreeBSD TM etc.
[0181] Computer device 400 is also used to perform tasks such as Figures 2 to 4 The steps in the corresponding embodiments, or the execution of such... Figures 7 to 8 The steps in the corresponding embodiments.
[0182] Another aspect of this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform actions such as... Figures 2 to 4 The steps in the method described in the illustrated embodiment, or the execution of such... Figures 7 to 8 The steps in the method described in the illustrated embodiment.
[0183] Another aspect of this application provides a computer program product containing instructions that, when run on a computer or processor, cause the computer or processor to perform actions such as Figures 2 to 4 The steps in the method described in the illustrated embodiment, or the execution of such... Figures 7 to 8 The steps in the method described in the illustrated embodiment.
[0184] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0185] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of 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 an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0186] 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.
[0187] Furthermore, the functional units in the various embodiments of this application 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.
[0188] 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, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A configuration distribution method, characterized in that, Applications include scenarios where different configuration content is pushed to different IoT devices, including: The configuration distribution platform receives a query configuration request sent by the target device. The query configuration request is sent when the first summary information and the second summary information obtained by the target device are inconsistent. The first summary information comes from the device shadow. The first summary information of the device shadow is obtained when the target device synchronizes data with the device shadow. The first summary information is used to determine whether the configuration content currently used by the target device needs to be updated. The second summary information is generated by the target device based on the original configuration content. The query configuration request carries the device identifier of the target device or the summary identifier corresponding to the first summary information. The configuration distribution platform sends the query configuration request to the source device, wherein the query configuration request is used to request the source device to query target configuration content, and the target configuration content has a corresponding relationship with the first summary information; The configuration distribution platform receives the target configuration content sent by the source device, wherein the source device sends the target configuration content to the configuration distribution platform through the configuration identifier provided to the source device by the configuration distribution platform; The configuration distribution platform sends the target configuration content to the target device; The configuration distribution platform monitors the reporting attributes in the device shadow in real time, wherein the reporting attributes are the current configuration status of the target device reported by the device shadow; If the configuration distribution platform detects that the first summary information of the device shadow in the report attribute is consistent with the summary of the target configuration content, it outputs a message indicating that the configuration distribution was successful. Before the configuration distribution platform receives the query configuration request sent by the target device, the method further includes: The configuration distribution platform receives a configuration distribution request sent by the source device, and the configuration distribution request carries at least a unique device identifier; The configuration distribution platform obtains the configuration content to be configured sent by the source device according to the configuration distribution request; The configuration distribution platform generates a summary of the content to be configured based on the content to be configured. The configuration distribution platform determines the target device and the device shadow corresponding to the target device based on the device's unique identifier. The configuration distribution platform uses the configuration identifier as the attribute name of the device shadow and the summary of the content to be configured as the first summary information, wherein the configuration identifier corresponds to the source device.
2. A configuration processing method, characterized in that, Applications include scenarios where different configuration content is pushed to different IoT devices, including: The target device obtains first summary information, which is derived from a device shadow. When the target device synchronizes data with the device shadow, it obtains the first summary information of the device shadow. The first summary information is used to determine whether the configuration content currently used by the target device needs to be updated. The target device obtains the original configuration content from the local database; The target device generates a second summary information based on the original configuration content; If the first summary information is inconsistent with the second summary information, the target device sends a query configuration request to the configuration distribution platform. The query configuration request is used to request the source device to query the target configuration content through the configuration distribution platform. The target configuration content has a corresponding relationship with the first summary information. The query configuration request carries the device identifier of the target device or the summary identifier corresponding to the first summary information. The target device receives the target configuration content sent by the configuration distribution platform, wherein the source device sends the target configuration content to the configuration distribution platform through the configuration identifier provided to the source device by the configuration distribution platform; The target device updates the current reporting attributes of the device shadow according to the target configuration content, wherein the reporting attributes are used to store the current configuration status of the target device.
3. The method according to claim 2, characterized in that, After the target device receives the target configuration content sent by the configuration distribution platform, the method further includes: The target device stores the target configuration content in a local database; When the target device detects the device shadow or the configuration distribution platform malfunctions, the target configuration content is retrieved from the local database, and the logic in the target configuration content is executed.
4. A configuration distribution device, characterized in that, Applications include scenarios where different configuration content is pushed to different IoT devices, including: The acquisition unit is configured to receive a query configuration request sent by a target device from the configuration distribution platform. The query configuration request is sent when the first summary information and the second summary information obtained by the target device are inconsistent. The first summary information comes from a device shadow. The first summary information of the device shadow is obtained when the target device synchronizes data with the device shadow. The first summary information is used to determine whether the configuration content currently used by the target device needs to be updated. The second summary information is generated by the target device based on the original configuration content. The query configuration request carries the device identifier of the target device or a summary identifier corresponding to the first summary information. The sending unit is used for the configuration distribution platform to send the query configuration request to the source device, wherein the query configuration request is used to request the source device to query target configuration content, and the target configuration content has a corresponding relationship with the first summary information; The acquisition unit is further configured to receive the target configuration content sent by the source device from the configuration distribution platform, wherein the source device sends the target configuration content to the configuration distribution platform through the configuration identifier provided to the source device by the configuration distribution platform; The sending unit is further configured to send the target configuration content to the target device via the configuration distribution platform; The monitoring unit is configured to send reports to the platform for real-time monitoring of the device shadow, wherein the report attribute is the current configuration status of the target device reported by the device shadow; The output unit is configured to output a message indicating successful configuration distribution if the configuration distribution platform detects that the first summary information of the report attribute of the device shadow is consistent with the summary of the target configuration content. The acquisition unit is further configured to receive a configuration delivery request sent by the source device, wherein the configuration delivery request carries at least a unique device identifier; and the configuration delivery platform acquires the configuration content to be configured sent by the source device according to the configuration delivery request. The generation unit is used to configure the distribution platform to generate a summary of the content to be configured based on the content to be configured. The determination unit is configured to configure the distribution platform to determine the target device and the device shadow corresponding to the target device based on the unique identifier of the device. The storage unit is used to configure the distribution platform to use the configuration identifier as the attribute name of the device shadow and the summary of the content to be configured as the first summary information, wherein the configuration identifier has a corresponding relationship with the source device.
5. A configuration processing apparatus, characterized in that, Applications include scenarios where different configuration content is pushed to different IoT devices, including: The acquisition unit is used for the target device to acquire first summary information, which is derived from a device shadow. When the target device synchronizes data with the device shadow, the first summary information of the device shadow is acquired. The first summary information is used to determine whether the configuration content currently used by the target device needs to be updated. The acquisition unit is further configured to obtain the original configuration content from the local database for the target device; A generation unit is used for the target device to generate second summary information based on the original configuration content; The sending unit is configured to send a query configuration request to the configuration distribution platform if the first summary information is inconsistent with the second summary information. The query configuration request is used to request the configuration distribution platform to query the target configuration content, the target configuration content having a corresponding relationship with the first summary information, and the query configuration request carrying the device identifier of the target device or the summary identifier corresponding to the first summary information. The acquisition unit is further configured to receive the target configuration content sent by the configuration distribution platform from the target device, wherein the source device sends the target configuration content to the configuration distribution platform through the configuration identifier provided to the source device by the configuration distribution platform; An update unit is used for the target device to update the current reporting attributes of the device shadow according to the target configuration content, wherein the reporting attributes are used to store the current configuration status of the target device.
6. The apparatus according to claim 5, characterized in that, The device also includes a storage unit and a detection unit; The storage unit is used by the target device to store the target configuration content into a local database; The detection unit is used to retrieve the target configuration content from the local database and execute the logic in the target configuration content when the target device detects the device shadow or the configuration distribution platform malfunctions.
7. A computer device, characterized in that, include: Memory, transceiver, processor, and bus system; The memory is used to store programs; When the processor executes a program in the memory, it implements the method as described in claim 1, or executes the method as described in any one of claims 2 to 3; The bus system is used to connect the memory and the processor to enable communication between the memory and the processor.
8. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of claim 1, or to perform the method of any one of claims 2 to 3.
9. A computer program product, characterized in that, The computer program product includes computer instructions, which a processor of a network device executes to cause the network device to perform the method as claimed in claim 1, or to perform the method as claimed in any one of claims 2 to 3.
Citation Information
Patent Citations
IOT equipment configuration management method and device, equipment and medium
CN111901152A
Method, device and equipment for managing cloud intercom equipment based on equipment shadow service
CN112835643A