Method for associating equipment with cloud service in batch and corresponding equipment
By collecting equipment information in the LAN and constructing the IP pool of the public network, the problem of a large number of equipment in the existing technology has been solved, and the rapid batch correlation of the equipment is achieved, which is suitable for a variety of scenarios.
Patent Information
- Application Number
- CN202310876441.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-17
- Publication Date
- 2025-01-24
AI Technical Summary
In the prior art, when there are many devices, the efficiency of manual or USB flash drives for device association is low, making it difficult to achieve fast batch association.
Through the target, the device sends out the discovery message in the local area network, collects equipment information, and uses the public network IP address to build the public network IP pool to send organizational coding and equipment information to the cloud service equipment to achieve batch associations.
In the scenario of the number of equipment, the efficiency of the equipment association is improved in a large number of equipment, and the efficiency of equipment association is improved. It is suitable for the batch association of equipment for a single local area network and cross -site network.
Smart Images

Figure CN119363714A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of device association, and in particular to a method for associating devices in batches with cloud services and corresponding devices. Background Art
[0002] In the prior art, a large number of devices are deployed in some universities and enterprises. Universities or enterprises need to uniformly manage the devices within their geographical areas. The premise of unified management is that the devices need to be associated with the specified organization code. However, this association process currently requires manual association, and the organization code needs to be entered through the interface.
[0003] There is a big problem with the current association technology. When the number is large, the devices need to be manually associated to the designated organization one by one. Although there is also a convenient way to associate using a USB flash drive, which is more convenient than the manual association method, these methods are less efficient when the number is large. Summary of the invention
[0004] The embodiments of the present application provide a method for associating devices in batches with cloud services and corresponding devices to solve the problem that the existing association method is relatively inefficient when the number of devices is large.
[0005] The purpose of the embodiment of the present invention is achieved through the following technical solutions:
[0006] To solve the above technical problems, in a first aspect, an embodiment of the present invention provides a method for associating devices in batches with a cloud service, determining device information of target candidate devices, wherein the target candidate devices include target discovery devices;
[0007] Displaying device information of target candidate devices, so as to filter out device information of target associated devices from the device information of target candidate devices;
[0008] The acquired organization code and the device information of the target associated device are sent to the cloud service device so that the cloud service device can perform batch association.
[0009] Further, the target candidate devices are all in the same local area network, and the target candidate devices also include at least one discovered device;
[0010] The device information of the target candidate device to be determined includes:
[0011] The target discovery device sends a discovery message to the outside and receives a response message based on the discovery message;
[0012] Parse the response message to obtain device information of the discovered device in the local area network;
[0013] The device information of the target discovery device is obtained by itself.
[0014] Furthermore, the device information of the target candidate device is determined including:
[0015] The target discovery device sends a discovery message to the outside and receives a response message based on the discovery message, wherein the target discovery device is in the first local area network;
[0016] Collecting a first public network IP pool in the first local area network based on the response message;
[0017] Sending the first public IP pool to the cloud service device so that the cloud service device can obtain the target candidate device according to the first public IP pool;
[0018] Receive device information of a target candidate device from a cloud service device.
[0019] Further, collecting the first public network IP pool in the first local area network based on the response message includes:
[0020] Parse the response message to obtain the public IP address of each discovered device in the first local area network;
[0021] The public IP addresses of each discovered device in the first local area network and the public IP address of the target discovered device itself are collected to obtain a first public IP pool.
[0022] Further, when there is a first extension device that does not belong to the first local area network among the first candidate devices obtained by the cloud service device according to the first public IP pool, the first public IP pool is extended by the second public IP pool collected by the first extension device in the local area network where the first extension device is located to generate a new first public IP pool;
[0023] The receiving device information of the target candidate device from the cloud service device includes:
[0024] Receive device information of the target candidate device obtained by the cloud service device based on the new first public IP pool.
[0025] In order to solve the above technical problems, in a second aspect, an embodiment of the present invention provides a method for associating devices in batches with cloud services, the method for associating devices in batches with cloud services comprising:
[0026] Send the acquired device information of the target candidate device to the target discovery device;
[0027] Receiving the organization code sent by the target discovery device and the device information of the target associated device screened from the device information of the target candidate device;
[0028] Batch associate the device information of the target associated devices to the organization code.
[0029] Furthermore, sending the acquired device information of the target candidate device to the target discovery device includes:
[0030] Receive a first public IP pool from a target discovery device;
[0031] The pre-established relationship database is traversed according to the first public network IP pool to obtain device information of the target candidate device.
[0032] Furthermore, traversing a pre-established relationship database according to the first public network IP pool to obtain device information of the target candidate device includes:
[0033] Acquire device information of the first candidate device according to the first public network IP pool collected by the target discovery device;
[0034] Determine the local area network belonging status of the first candidate device according to the device information of the first candidate device;
[0035] The device information of the first candidate device is expanded according to the local area network belonging status of the first candidate device, so as to use the expanded device information of the first candidate device as the device information of the target candidate device.
[0036] Further, the target discovery device is in a first local area network;
[0037] The step of expanding the device information of the first candidate device according to the local area network belonging status of the first candidate device to use the expanded device information of the first candidate device as the device information of the target candidate device includes:
[0038] When all of the first candidate devices belong to the first local area network, using the device information of the first candidate devices as the device information of the final target candidate devices;
[0039] When there is a first extension device that does not belong to the first local area network among the first candidate devices, receiving a second public network IP pool of the local area network where the first extension device is located collected by the first extension device;
[0040] Expanding the first public IP pool according to the second public IP pool to obtain a new first public IP pool;
[0041] The device information of the first candidate device is expanded according to the new first public network IP pool, so that the expanded device information of the first candidate device is used as the device information of the target candidate device.
[0042] Further, the expanding the first public IP pool according to the second public IP pool to obtain a new first public IP pool includes:
[0043] If the second public IP pool contains an extended public IP address that is not included in the first public IP pool, determining device information of a second candidate device corresponding to the extended public IP address;
[0044] If it is determined according to the device information of the second candidate device that there is no second extended device belonging to the local area network to be collected in the second candidate device, then the extended public IP address is added to the first public IP pool to obtain a new first public IP pool;
[0045] If it is determined according to the device information of the second candidate device that there is a second extension device belonging to the local area network to be collected in the second candidate device, then the third public IP pool that is continuously collected by the second extension device in the local area network to be collected is received, and the first public IP pool that has been extended to include the extended public IP address is continuously extended according to the third public IP pool until a preset condition is met, then the extension of the first public IP pool is stopped to obtain a new first public IP pool;
[0046] Among them, the LAN to be collected is a LAN that has not collected public IP addresses.
[0047] To solve the above technical problems, in a third aspect, an embodiment of the present invention provides a device for batch associating cloud services, including:
[0048] at least one processor; and,
[0049] a memory communicatively connected to the at least one processor; wherein,
[0050] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for associating devices in batches with cloud services as described in the first aspect or the method for associating devices in batches with cloud services as described in the second aspect.
[0051] To solve the above technical problems, in the fourth aspect, an embodiment of the present invention provides a non-volatile computer storage medium, wherein the computer storage medium stores computer executable instructions, which are executed by one or more processors to complete the method for batch associating devices with cloud services described in the first aspect or the second aspect.
[0052] Compared with the prior art, the beneficial effects of the embodiments of the present invention are: the devices within a predetermined range can be determined, and the discovered devices belonging to the predetermined range can be visually displayed on the display interface, so that users can select the corresponding devices in batches, thereby quickly associating the selected devices under the specified organization code. The present invention can be applied to scenarios with a large number of devices, can realize batch association, and improve the efficiency of device association. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements / modules and steps with the same reference numerals in the drawings are represented as similar elements / modules and steps. Unless otherwise specified, the figures in the drawings do not constitute proportional limitations.
[0054] Figure 1 It is a flowchart of a method for associating devices in batches with cloud services provided by an embodiment of the present invention (starting from the target discovery device);
[0055] Figure 2 This is a schematic diagram of a scenario in which a device is associated with a cloud service device in batches, provided by an embodiment of the present invention;
[0056] Figure 3 The embodiment of the present invention provides Figure 1 A schematic diagram of a specific implementation flow of step 10;
[0057] Figure 4 It is a flowchart of another method for associating devices in batches with cloud services provided by an embodiment of the present invention (starting from a cloud service device);
[0058] Figure 5 The embodiment of the present invention provides Figure 4 A schematic diagram of a specific implementation flow of step 20;
[0059] Figure 6 The embodiment of the present invention provides Figure 5 A schematic diagram of a specific implementation process of step 202;
[0060] Figure 7 This is a schematic diagram of another scenario in which devices are batch-associated with cloud service devices provided by an embodiment of the present invention;
[0061] Figure 8 It is a flowchart of a method for associating devices in batches with cloud services provided by an embodiment of the present invention (batch association within a local area network);
[0062] Fig. 9 It is a flowchart of a method for associating devices in batches with cloud services (batch association across local area networks) according to an embodiment of the present invention;
[0063] Fig.10 It is a structural diagram of a device for batch associating cloud services provided by an embodiment of the present invention;
[0064] Fig.11 It is a structural diagram of another device for batch associating cloud services provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0065] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several variations and improvements may be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0066] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0067] It should be noted that, if there is no conflict, the various features in the embodiments of the present invention can be combined with each other, and all are within the scope of protection of this application. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order than the module division in the device or the order in the flow chart.
[0068] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0069] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0070] The method for associating devices in batches with cloud services in an embodiment of the present invention is used to associate multiple devices to a certain organization for unified management. The aforementioned device may be a cloud device, such as a cloud desktop device, or may be other types of devices, which are not specifically limited herein. The method for associating devices in batches with cloud services is not only applicable to batch association of devices within a single local area network, but also to batch association of devices across local area networks (i.e., association of devices in multiple different local area networks), which will be described in the following embodiments.
[0071] The embodiments of the present invention illustrate the method of batch associating devices with cloud services from the perspectives of the target discovery device and the cloud service device. The target discovery device refers to the device that performs batch association, which can be any one of many devices. The cloud service device can be understood as the cloud background, and many devices are associated with the cloud service device, which can be managed uniformly by the cloud service device.
[0072] Embodiment 1:
[0073] In order to solve the problem of low efficiency of manual device association or USB device association in the prior art, this embodiment provides a method for batch associating devices with cloud services. The method for batch associating devices with cloud services is based on the perspective of target discovery device. First, one of the devices in the local area network is used as the target discovery device, and other devices in the local area network are discovered through the target discovery device.
[0074] See also Figure 1 , the method for associating devices in batches with cloud services includes:
[0075] Step 10: Determine the device information of the target candidate device.
[0076] Among them, the target candidate device includes a target discovery device, and the target candidate device also includes other devices within a predetermined range with the target discovery device. In terms of geographical scope, the predetermined range can be understood as a classroom in a school, or a school; the predetermined range can also be understood as a building in an enterprise, or an enterprise. In terms of network scope, the predetermined range can include the scope of a local area network, the scope of several local area networks, or the scope of a wide area network, and this embodiment does not make specific limitations on this.
[0077] The device information includes at least one of the device name, device identifier, private IP address and public IP address. The device identifier can be understood as the unique identifier of the device, which is mainly used for security verification of unassociated devices before device association; the device name is to facilitate users to know which device it is, and is mainly used to visualize a device on the cloud service device (which can be understood as the background) to facilitate administrators to locate the device. The device name can also be displayed on the visual interface of the target discovery device to facilitate users to find the required device.
[0078] Step 11: Display device information of the target candidate devices, so as to filter out device information of the target associated device from the device information of the target candidate devices.
[0079] In one example, the device information of the determined target candidate devices can be displayed on the target discovery device to be presented to the user, and the user can filter the device information of the target associated devices from the device information of the target candidate devices. For example, the device identification and device name of the target candidate devices can be displayed on the target discovery device at the same time, or only the device name can be displayed, so that the user can select the devices that need to be batch associated according to the device name.
[0080] In one example, the target discovery device sends a discovery message to the outside, and the target discovery device receives a response message to the discovery message from other devices (discovered devices) in its local area network, and parses the response message to obtain device information of other devices, wherein the discovered device information can be displayed on the target discovery device. In actual applications, after the target discovery device receives the message from the discovered device, it can refresh the display interface to display the currently discovered devices.
[0081] In one example, the device information of the target candidate devices may be displayed on a display interface of the target discovery device, and the user may select certain devices from the device information of the target candidate devices as target associated devices.
[0082] Step 12: Send the acquired organization code and the device information of the target associated device to the cloud service device, so that the cloud service device can perform batch association.
[0083] In one embodiment, the organization code may be triggered by a user; or it may be an organization code pre-set in the cloud service device, and the cloud service device automatically associates the target associated device according to the organization code.
[0084] The organization code can be understood as a unique identifier of an organization. For example, the organization code is a unique identifier of a certain enterprise A. Entering this organization code indicates that the selected target associated devices need to be associated with the organization of enterprise A. The organization code can also be a unique identifier of department B of enterprise A, indicating that the selected target associated devices need to be associated with the organization of department B. This embodiment does not specifically limit the way in which the target discovery device obtains the organization code.
[0085] In one embodiment, the user inputs the organization code as an example for explanation. In this embodiment, the user can input the organization code in the input interface of the target discovery device, and the target discovery device will inform the cloud service device of the acquired organization code and the device information of the target associated device, and the cloud service device will batch associate the target associated devices to the designated organization corresponding to the organization code. Among them, the target discovery device can also call the interface of the cloud service device to perform batch association of devices.
[0086] The embodiment of the present invention can determine the devices within a predetermined range, and visually display the discovered devices belonging to the predetermined range on the display interface, so that users can select the corresponding devices in batches, thereby quickly associating the selected devices with the specified organization code. The present invention can be applied to scenarios with a large number of devices, can realize batch association, and improve the efficiency of device association.
[0087] Embodiment 2:
[0088] Based on the aforementioned embodiment 1, this embodiment specifically describes how to collect the device information of all target candidate devices in the local area network when multiple devices that need to be associated are deployed in the same local area network, so as to facilitate the subsequent screening of target associated devices. This embodiment adopts a discovery mechanism within the local area network, where the target discovery device sends a discovery message within the local area network, and the device that receives the discovery message sends a response message carrying device information to the target discovery device. The target discovery device uses the device information obtained from the response message and its own device information as the device information of the target candidate device, thereby collecting the device information of all target candidate devices in the local area network.
[0089] In a specific application scenario, the method for batch associating devices with cloud services can be applied to batch associating devices in a local area network. The target candidate devices are all in the same local area network, and the target candidate devices also include at least one discovered device, wherein the discovered device is another device discovered by the target discovery device and in the same local area network as the target discovery device.
[0090] In this application scenario, the specific execution process of step 10 may include: the target discovery device sends a discovery message to the outside and receives a response message based on the discovery message; the response message is parsed to obtain the device information of the discovered device in the local area network; wherein the device information of the target discovery device is obtained by itself.
[0091] Specifically, the target discovery device can discover other devices in the local area network through the discovery message. The response message is the response message of the discovered device to the discovery message, and the device information of the discovered device can be obtained through the response message. The target discovery device receives response messages from other devices (discovered devices) in the local area network, parses the response messages, obtains the device information of other devices, and displays the discovered device information. In actual applications, after the target discovery device receives the message from the discovered device, it can refresh the display interface to display the target candidate devices that have been discovered. According to the aforementioned method, the device information of other devices in the local area network can be gradually discovered and visualized on the target discovery device. The user can select the target associated devices that need to be associated in batches as needed.
[0092] In one embodiment, the discovery message is a multicast message. After being started, all devices in the same local area network will subscribe to a multicast message. In step 10, it may specifically include: the target discovery device sends a multicast message to other devices in the local area network, and receives response messages from other devices based on the multicast message. The response message is parsed to obtain the device information of the discovered device; each time a discovered device is discovered, the device information displayed on the current interface is refreshed in real time.
[0093] Among them, multicast is a mechanism for sending batch messages in a local area network. After being started, the discovered device will subscribe to a multicast message. For example, the subscribed multicast address and port can be shown in the following table:
[0094] Multicast Address port 231.118.118.118 10086
[0095] The target discovery device will send a multicast message 231.118.118.118:10086 during the discovery process.
[0096] After the discovered device receives the multicast message, it will fill its own device information in the response message and then send the response message to the discovered device. The message protocol of the response message can use Json RPC 2.0, and the protocol key value can be as follows:
[0097] Key Value deviceName Device Name deviceId Device ID, unique identifier of the device
[0098] After receiving the response message, the target discovery device parses the response message and obtains the device information of the discovered device.
[0099] According to this multicast mechanism, all devices in the local area network can be discovered and displayed on the target discovery device to facilitate user selection.
[0100] by Figure 2 For example, device A is the target discovery device, and devices B, C, and D are discovered devices. Device A sends multicast messages to devices B, C, and D respectively, so as to discover devices B, C, and D in the 172.20.63.* local area network.
[0101] The embodiment of the present invention adopts a discovery mechanism within a local area network, determines the target candidate devices within a predetermined range by sending a discovery message, and visualizes the discovered target candidate devices belonging to the predetermined range on a display interface, so that users can select the corresponding target-associated devices in batches, thereby associating the target-associated devices under the specified organization code. It can be suitable for scenarios with a large number of devices, can realize batch association of devices, and improve the efficiency of device association.
[0102] Embodiment 3:
[0103] This embodiment specifically explains that when multiple devices that need to be associated are deployed in different local area networks, the method of discovering other devices in the local area network according to the aforementioned embodiment 2 cannot discover devices in other local area networks. In order to solve the problem of batch association of devices across local area networks, the target discovery device needs to collect the device information of all target candidate devices in different local area networks to facilitate subsequent screening of target associated devices. Based on the aforementioned embodiment 1, this embodiment introduces public IP addresses and uses public IP addresses as the medium for different local area networks to gradually determine the device information of devices distributed in different local area networks.
[0104] For example, many large enterprises and schools have more than one public IP address, and the private IP addresses of different devices may be mapped to different public IP addresses. The public IP addresses of all devices in a LAN can be obtained, and the devices belonging to the discovered public IP addresses can be obtained from the cloud service devices through the discovered public IP addresses. Then, based on the divergence of the LAN where the discovered devices are located, other public IP addresses mapped within the LAN can be found. The public IP addresses of the enterprise can be enumerated as much as possible to build a public IP pool, and then the devices in different LANs can be obtained based on the public IP pool, thereby realizing batch association across LANs.
[0105] See also Figure 3 In the cross-LAN batch association, the specific implementation of step 10 includes:
[0106] Step 101: a target discovery device sends a discovery message to the outside, and receives a response message based on the discovery message.
[0107] In this embodiment, the target discovery device is in the first local area network. The target discovery device sends a discovery message externally in the first local area network, and receives a response message based on the discovery message from other devices in the first local area network.
[0108] In one example, the discovery message may be the multicast message described in Example 2. After receiving the multicast message, other devices in the first local area network may obtain the corresponding public IP address through the STUN (Session Traversal Utilities for NAT) technology, and fill the public IP address in the response message, that is, the response message carries the public IP address. Of course, the public IP address may also be obtained through other technologies, which are not specifically limited here.
[0109] Step 102: Collect the first public IP pool in the first local area network based on the response message.
[0110] In this embodiment, the target discovery device parses the response message to obtain the public IP address of each discovered device in the first local area network; collects the public IP addresses of each discovered device in the first local area network and the public IP address of the target discovery device itself to obtain the first public IP pool.
[0111] Specifically, the target discovery device parses the response message it receives and obtains the public IP addresses of each discovered device in the first local area network. At the same time, the target discovery device obtains its corresponding public IP address through STUN technology. The target discovery device adds its own public IP address and the public IP addresses of each discovered device to the first public IP pool. Preferably, if the same public IP address exists, the same public IP address is first filtered out, and then the filtered public IP address is added to the first public IP pool.
[0112] Step 103: Send the first public IP pool to the cloud service device, so that the cloud service device can obtain the target candidate device according to the first public IP pool.
[0113] The target candidate device is located in at least two local area networks. Other devices that are not in the first local area network can be obtained through the first public network IP pool. The specific acquisition method is described below.
[0114] Step 104: Receive device information of the target candidate device from the cloud service device.
[0115] The cloud service device has a pre-set relationship database, which reflects the mapping relationship between the public IP address and the device information. The cloud service device can obtain the corresponding device information based on the public IP address. One public IP address corresponds to one or more device information.
[0116] The target discovery device sends the first public IP pool to the cloud service device, and the cloud service device obtains the public IP address in the first public IP pool, traverses the relationship library according to the public IP address, and obtains the device information of the target candidate device corresponding to the first public IP pool.
[0117] In the actual application scenario, the cloud service device obtains the device information of the first candidate device based on the first public IP pool collected by the target discovery device; determines the LAN affiliation of the first candidate device based on the device information of the first candidate device; selectively expands the device information of the first candidate device based on the LAN affiliation of the first candidate device, and then obtains the device information of the final target candidate device.
[0118] In actual application scenarios, when the cloud service device includes a first extension device that does not belong to the first local area network where the current target discovery device is located among the first candidate devices obtained based on the first public IP pool, the first public IP pool is expanded by the second public IP pool collected by the first extension device in the local area network where it is located to generate a new first public IP pool.
[0119] Among them, if the second public IP pool does not contain an extended public IP address that is not included in the first public IP pool, there is no need to expand the first public IP pool, and the device information of the first candidate device is used as the device information of the final target candidate device. If the second public IP pool contains an extended public IP address that is not included in the first public IP pool, the first public IP pool needs to be expanded to generate a new first public IP pool.
[0120] The target discovery device receives the device information of the target candidate device obtained from the cloud service device based on the new first public IP pool. In one embodiment, the cloud service device can perform a traversal search based on the public IP addresses contained in the new first public IP pool to obtain the device information of the target candidate device. In another embodiment, the cloud service device can perform a traversal search based on the extended IP addresses contained in the new first public IP pool to obtain the newly added device, add the newly added device to the first candidate device to expand the first candidate device, and obtain the device information of the target candidate device.
[0121] Furthermore, in one embodiment, when there is an extended public IP address in the second public IP pool that is not included in the first public IP pool, and when it is determined based on the device information of the second candidate device corresponding to the extended public IP address that there is no second extended device belonging to the local area network to be collected in the second candidate device, the first public IP pool is extended by the extended public IP address to generate a new first public IP pool.
[0122] The specific implementation process is: if the second public IP pool contains an extended public IP address that is not included in the first public IP pool, the cloud service device determines the device information of the second candidate device corresponding to the extended public IP address. If it is determined based on the device information of the second candidate device that there is no second extended device belonging to the local area network to be collected in the second candidate device, the extended public IP address is added to the first public IP pool to obtain a new first public IP pool.
[0123] In another embodiment, when the second public IP pool contains an extended public IP address that is not included in the first public IP pool, and when it is determined that the second candidate device contains a second extended device belonging to the local area network to be collected based on the device information of the second candidate device corresponding to the extended public IP address, the first public IP pool that has been expanded to contain the extended public IP address is further expanded by the third public IP pool obtained by continuing to collect the second extended device in the local area network to be collected until the preset conditions are met and a new first public IP pool is generated.
[0124] The specific implementation process is: if it is determined according to the device information of the second candidate device that there is a second extension device belonging to the local area network to be collected in the second candidate device, the cloud service device receives the third public IP pool that is continued to be collected by the second extension device in the local area network to be collected, and continues to expand the first public IP pool that has been expanded to include the extended public IP address according to the third public IP pool until the preset conditions are met, then stops expanding the first public IP pool to obtain a new first public IP pool; wherein, the local area network to be collected is a local area network for which public IP addresses have not been collected.
[0125] For the specific expansion process of the first public network IP pool, please refer to the following Example 4.
[0126] In an embodiment of the present invention, the public IP addresses of all devices in a local area network where the target discovery device is located are obtained, and the device belonging to the discovered public IP address is obtained from the cloud service device through the discovered public IP address, and then other public IP addresses mapped within the local area network where the discovered device is located are found based on the divergence of the local area network where the discovered device is located. Public IP addresses can be enumerated as much as possible to build a public IP pool, and then devices in different local area networks are obtained based on the public IP pool, thereby realizing batch association across local area networks.
[0127] Embodiment 4:
[0128] This embodiment provides a method for associating devices in batches with cloud services. The method for associating devices in batches with cloud services is based on the perspective of cloud service devices. Figure 4 , the method for batch associating the device with the cloud service includes:
[0129] Step 20: Send the acquired device information of the target candidate device to the target discovery device.
[0130] Among them, the target candidate devices finally displayed by the target discovery device include the target discovery device. Since the target discovery device can obtain its own device information, the device information of the target candidate devices that has been obtained and sent by the cloud service device may include the target discovery device or may not include the target discovery device, which is not specifically limited in this embodiment.
[0131] In one embodiment, after acquiring all target candidate devices, the cloud service device sends all target candidate devices to the target discovery device.
[0132] In another embodiment, the cloud service device sends the currently acquired target candidate devices in multiple rounds. For example, each time a target candidate device is acquired, the target candidate device is sent to the target discovery device; or each time several target candidate devices are acquired, several target candidate devices are sent to the target discovery device.
[0133] In another embodiment, the target candidate device may be obtained through multiple pollings, and the cloud service device sends the currently obtained target candidate devices in batches according to the polling progress. For example, if the target candidate device is obtained through three pollings, the cloud service device sends the currently obtained target candidate devices in three batches.
[0134] Step 21: Receive the organization code sent by the target discovery device and the device information of the target associated device screened out from the device information of the target candidate device.
[0135] Step 22: Batch associate the device information of the target associated devices to the organization code.
[0136] The target discovery device will inform the cloud service device of the device information of the target associated device and the organization code that the target associated device needs to be associated with, and the cloud service device will associate the target associated devices in batches.
[0137] For details of step 21 and step 22, please refer to the aforementioned embodiment 1, which will not be described in detail here.
[0138] In actual application scenarios, the devices that need to be associated may be distributed in different LANs. In order to achieve cross-LAN association, refer to Figure 5 In step 20, the following may be specifically included:
[0139] Step 201: Receive a first public IP pool from a target discovery device.
[0140] In this embodiment, the target discovery device is in the first local area network; the target discovery device sends a discovery message to the outside in the first local area network, and receives a response message based on the discovery message from other devices in the first local area network. The target discovery device parses the response message to obtain the public IP address of each discovered device in the first local area network; collects the public IP address of each discovered device in the first local area network and the public IP address of the target discovery device itself to obtain the first public IP pool, and sends the first public IP pool to the cloud service device.
[0141] The cloud service device receives the first public IP pool from the target discovery device.
[0142] Step 202: Traverse the pre-established relationship database according to the first public network IP pool to obtain device information of the target candidate device.
[0143] The cloud service device is pre-set with a relationship database, which reflects the mapping relationship between the public IP address and the device information. The cloud service device can obtain the corresponding device information according to the public IP address. One public IP address corresponds to one or more device information.
[0144] The cloud service device obtains a public IP address in the first public IP pool, traverses the relationship library according to the public IP address, obtains the device information of the first candidate device corresponding to the first public IP pool, and selectively expands the device information of the first candidate device according to the local area network affiliation of the first candidate device to obtain the device information of the final target candidate device.
[0145] Continue reading Figure 6 In step 202, the following may be specifically included:
[0146] Step 2021: Obtain device information of the first candidate device according to the first public IP pool collected by the target discovery device.
[0147] The cloud service device first traverses and searches the first public IP pool collected by the target discovery device to obtain device information of the first candidate device.
[0148] Step 2022: Determine the LAN affiliation of the first candidate device according to the device information of the first candidate device.
[0149] The first candidate devices include all devices belonging to the first local area network, and there may also be devices that do not belong to the first local area network.
[0150] The device information includes not only the device name and device identifier, but also the private network IP address, public network IP address and subnet mask; the LAN affiliation of the first candidate device can be determined according to the subnet mask.
[0151] Step 2023: Expand the device information of the first candidate device according to the LAN belonging status of the first candidate device, so as to use the expanded device information of the first candidate device as the device information of the target candidate device.
[0152] In this embodiment, the device information of the first candidate device is selectively expanded according to the LAN belonging status of the first candidate device, so that the expanded device information of the first candidate device is used as the device information of the target candidate device.
[0153] In one embodiment, when all the first candidate devices belong to the first local area network, there is no need to expand the device information of the first candidate devices, and the device information of the first candidate devices is used as the device information of the final target candidate devices. In this case, it is essentially equivalent to batch association of devices in the local area network.
[0154] In another embodiment, when there is a first extension device that does not belong to the first local area network among the first candidate devices, a second public IP pool of the local area network in which the first extension device is located is received; the first public IP pool is expanded according to the second public IP pool to obtain a new first public IP pool; and the device information of the first candidate device is expanded according to the new first public IP pool to use the device information of the expanded first candidate device as the device information of the target candidate device.
[0155] The number of the first expansion devices is one or more.
[0156] In one embodiment, if the number of the first extension device is one, the first extension device is configured as an intermediate discovery device, and the intermediate discovery device collects the second public network IP pool in the local area network where the intermediate discovery device is located.
[0157] In another embodiment, if there are multiple first expansion devices, it is necessary to determine whether the multiple first expansion devices belong to different local area networks. If the multiple first expansion devices all belong to the same local area network, one of the first expansion devices is selected to be configured as an intermediate discovery device, and the intermediate discovery device collects the second public network IP pool in the local area network where it is located.
[0158] In another embodiment, when there are multiple first extension devices, the local area networks to which each first extension device belongs may also be different, and the cloud service device will receive the second public network IP pool of the local area network in which it is located collected by different first extension devices. Specifically, if multiple first extension devices do not belong to the same local area network, then according to the local area network belonging conditions of the multiple first extension devices, the corresponding first extension devices are configured as intermediate discovery devices respectively, and the intermediate discovery devices collect the second public network IP pool in the local area network in which they are located. Among them, the number of second public network IP pools is multiple, which specifically depends on the local area network belonging conditions of the multiple first extension devices.
[0159] For example, if multiple first extension devices are distributed in the second LAN and the third LAN, one of the first extension devices belonging to the second LAN is configured as an intermediate discovery device, and the intermediate discovery device collects the second public IP pool in the second LAN. One of the first extension devices belonging to the third LAN is configured as an intermediate discovery device, and the intermediate discovery device collects the second public IP pool in the third LAN.
[0160] In one embodiment, the first public IP pool is expanded according to the second public IP pool to obtain a new first public IP pool, which may specifically include:
[0161] If the second public IP pool contains an extended public IP address that is not included in the first public IP pool, device information of a second candidate device corresponding to the extended public IP address is determined.
[0162] Among them, the public IP addresses in the second public IP pool and the first public IP pool may overlap, so it is only necessary to determine the extended public IP address that does not exist in the first public IP pool. The cloud service device can traverse and search according to the extended public IP address to determine the device information of the second candidate device corresponding to the extended public IP address, and then determine whether it is necessary to continue to expand the first public IP pool based on the LAN affiliation of the second candidate device.
[0163] In one embodiment, if it is determined based on the device information of the second candidate device that there is no second extended device belonging to the local area network to be collected in the second candidate device, the extended public IP address is added to the first public IP pool to obtain a new first public IP pool; the device information of the first candidate device is expanded based on the new first public IP pool to use the device information of the expanded first candidate device as the device information of the target candidate device.
[0164] In another embodiment, if it is determined based on the device information of the second candidate device that there is a second extension device belonging to the local area network to be collected in the second candidate device, then the third public IP pool that is continued to be collected by the second extension device in the local area network to be collected is received, and the first public IP pool that has been expanded to include the extended public IP address is continued to be expanded based on the third public IP pool until a preset condition is met, then the expansion of the first public IP pool is stopped to obtain a new first public IP pool; wherein, the local area network to be collected is a local area network for which public IP addresses have not been collected.
[0165] The number of the second expansion devices is one or more.
[0166] In one embodiment, if the number of the second extension device is one, the second extension device is configured as an intermediate discovery device, and the intermediate discovery device collects the third public network IP pool in the local area network where the intermediate discovery device is located.
[0167] In another embodiment, if there are multiple second extension devices, it is necessary to configure the corresponding second extension devices as intermediate discovery devices according to the local area network affiliations of the multiple second extension devices, and the intermediate discovery devices collect the third public network IP pool in the local area network where they are located. The number of the third public network IP pool is multiple, which specifically depends on the local area network affiliations of the multiple second extension devices.
[0168] In another embodiment, when there are multiple second extension devices, the local area networks to which each second extension device belongs may also be different, and the cloud service device will receive the third public network IP pool of the local area network in which it is located collected by different second extension devices. Specifically, if multiple second extension devices do not belong to the same local area network, then according to the local area network belonging to the multiple second extension devices, the corresponding second extension devices are configured as intermediate discovery devices respectively, and the intermediate discovery devices collect the third public network IP pool in the local area network in which they are located. Among them, the number of the third public network IP pool is multiple, which specifically depends on the local area network belonging to the multiple second extension devices.
[0169] For example, if multiple second extension devices are distributed in the fourth LAN and the fifth LAN, one of the second extension devices belonging to the fourth LAN is configured as an intermediate discovery device, and the intermediate discovery device collects the third public network IP pool in the fourth LAN. One of the second extension devices belonging to the fifth LAN is configured as an intermediate discovery device, and the intermediate discovery device collects the third public network IP pool in the fifth LAN.
[0170] Among them, the preset condition may be that the discovery time is greater than the set time threshold, wherein the discovery time may be the time from the target discovery device starting to execute the discovery process to the current moment, and the time threshold may be 1 minute or 5 minutes, which is not specifically limited here.
[0171] The preset condition may also be that the number of target candidate devices is greater than a set number threshold, and the number threshold may be 50, 100 or more, which is not specifically limited here.
[0172] The preset condition may also be that no extension device belonging to a local area network for which public IP addresses are not collected is discovered.
[0173] In actual application scenarios, the preset conditions may also be other forms, which can be determined according to actual conditions and are not specifically limited here.
[0174] In order to explain the above scheme more clearly, Figure 7 The scenario shown is used as an example. Figure 7 Device A0 in LAN A is used as the target discovery device, and device A0 collects public IP addresses in the LAN to obtain a first public IP pool. Assume that the first public IP pool = {public IP address 1, public IP address 2}.
[0175] Device A0 sends the first public network IP pool = {public network IP address 1, public network IP address 2} to the cloud service device, and the cloud service device performs a traversal search based on the first public network IP pool = {public network IP address 1, public network IP address 2} to obtain the first candidate device = {device A0, device A1, device A2, device B0, device C0}. Among the first candidate devices = {device A0, device A1, device A2, device B0, device C0}, device B0 and device C0 do not belong to local area network A, and device B0 and device C0 are both first extension devices. Since device B0 belongs to local area network B and device C0 belongs to local area network C, it is necessary to configure device B0 and device C0 as intermediate discovery devices respectively, and device B0 collects the second public network IP pool (for the sake of distinction, it is recorded as the second public network IP pool 1) in local area network B, and device C0 collects the second public network IP pool (for the sake of distinction, it is recorded as the second public network IP pool 2) in local area network C.
[0176] Assume that the second public IP pool 1 = {public IP address 1, public IP address 3}; the second public IP pool 2 = {public IP address 1, public IP address 4}; then the first public IP pool does not contain public IP address 3 and public IP address 4, and public IP address 3 and public IP address 4 are extended public IP addresses. Add public IP address 3 and public IP address 4 to the first public IP pool to obtain the new first public IP pool = {public IP address 1, public IP address 2, public IP address 3, public IP address 4}.
[0177] The cloud service device performs a traversal search based on public IP address 3 and obtains a second candidate device (for easy distinction, recorded as second candidate device 1); the cloud service device performs a traversal search based on public IP address 4 and obtains a second candidate device (for easy distinction, recorded as second candidate device 2).
[0178] Assume that the second candidate device 1 = {device B1, device B2, device D0, device D1, device D2}, and the second candidate device 2 = {device C1, device C2}; then among the second candidate devices formed by the second candidate device 1 and the second candidate device 2, there are devices D0, D1, and D belonging to the local area network to be collected (local area network D), and devices D0, D1, and D are second extended devices. Devices D0, D1, and D all belong to local area network D, and device D0 is configured as an intermediate discovery device, and device D0 continues to collect the third public network IP pool in local area network D.
[0179] Assuming that the third public IP pool = {public IP address 3}, public IP address 3 already exists in the new first public IP pool, there is no need to expand the new first public IP pool. The device information of the first candidate device is expanded according to the new first public IP pool = {public IP address 1, public IP address 2, public IP address 3, public IP address 4}, so as to use the device information of the expanded first candidate device as the device information of the target candidate device.
[0180] In actual application scenarios, the distribution of devices across LANs may be more complex than that of Figure 7 The above-mentioned collection of public IP addresses under multiple LANs may be more complicated, depending on the actual device deployment.
[0181] In an embodiment of the present invention, the public IP addresses of all devices in a local area network where the target discovery device is located are obtained, and the cloud service device reversely obtains the device belonging to the discovered public IP address through the discovered public IP address, and then finds other public IP addresses mapped within the local area network where the discovered device is located based on the divergence of the local area network where the discovered device is located. The public IP addresses can be enumerated as much as possible to build a public IP pool, and then the devices in different local area networks are obtained according to the public IP pool, thereby realizing batch association across local area networks.
[0182] Embodiment 5:
[0183] Combine the following Figure 8 , explaining the batch association process within a local area network.
[0184] Step 101: The discovered device A starts to monitor multicast messages.
[0185] Step 102: The discovered device B starts to monitor multicast messages.
[0186] Step 103: The discovered device C sends a multicast message to the discovered device A and the discovered device B respectively.
[0187] Step 104: The discovered device A parses the multicast message.
[0188] Step 105: The discovered device B parses the multicast message.
[0189] Step 106: The discovered device A returns basic information, including device ID, device name, etc.
[0190] Step 106: The discovered device B returns basic information, including device ID, device name, etc.
[0191] Step 108: Record the discovered device A (ie, the discovered device A).
[0192] Step 109: Record the discovered device B (ie, the discovered device B).
[0193] Step 110: Refresh the associable device interface in real time.
[0194] Step 111: Batch associate the discovered devices.
[0195] Batch association of devices within this local area network is achieved in the aforementioned manner.
[0196] Embodiment 6:
[0197] Combine the following Fig. 9 , explaining the batch association process across LANs:
[0198] Step 101: The cloud service device obtains the public IP address of the connected device.
[0199] Step 102: The public IP address is stored in the relationship database.
[0200] In step 101-step 102, after the device is started, it will automatically connect to the cloud service device through the MQTT protocol through our device management client. After connecting to the cloud service device, the cloud service device can obtain the public IP address used by the device when connecting, and will store it in the database for subsequent queries.
[0201] Step 103: The target discovery device sends a discovery message.
[0202] Step 104: Obtain its own public IP address.
[0203] Other devices in the LAN obtain their own public IP addresses through the STUN server multiple times.
[0204] Step 105: Send a response message carrying the public IP address.
[0205] Step 106: Send the first public IP pool.
[0206] The target discovery device sends the first public IP pool to the cloud service device.
[0207] The first public IP pool includes the public IP address of the target discovery device and the public IP addresses of other devices in the local area network
[0208] Step 107: According to the local area network affiliation of the device corresponding to the first public network IP pool, the first public network IP pool is selectively expanded to obtain device information of the target candidate device.
[0209] The device corresponding to the first public IP pool is obtained by querying the relationship database, and then the first public IP pool is selectively expanded according to the local area network affiliation of the device corresponding to the first public IP pool to obtain the device information of the target candidate device.
[0210] For details of step 107, please refer to the above-mentioned embodiment, which will not be described again here.
[0211] Step 108: Display device information of the target candidate device.
[0212] Step 109: Filter out target associated devices from the device information of the target candidate devices.
[0213] In step 108 and step 109, the target discovery device displays the target candidate devices returned by the background on the interface, and the user can perform unified operations on the target candidate devices, such as filtering out target-associated devices from the target candidate devices.
[0214] Step 110: Send the target associated device and organization code.
[0215] The target discovery device sends the target associated device and organization code to the cloud service device.
[0216] Step 111: Execute batch association.
[0217] The cloud service device associates the target associated devices in batches to the organization code.
[0218] Embodiment 7:
[0219] Based on the above-mentioned embodiments 1 to 6, Fig.10 As shown, this embodiment also provides a device for batch associating cloud services, including: at least one processor 21; and a memory 22 that is communicatively connected to the at least one processor 21; wherein the memory 22 stores instructions that can be executed by the at least one processor 21, and the instructions are executed by the at least one processor 21 so that the at least one processor 21 can execute the method for batch associating devices with cloud services described in the aforementioned embodiment.
[0220] The processor 21 and the memory 22 may be connected via a bus or other means. Fig.10 The example of connecting through bus is taken in the following.
[0221] The memory 22 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the method for associating devices in batches with cloud services in the embodiment of the present application. The processor 21 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 22, that is, the method for associating devices in batches with cloud services in the above method embodiment is implemented.
[0222] The memory 22 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created according to the use of the device associated with the batch cloud service, etc. In addition, the memory 22 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 22 may optionally include a memory remotely arranged relative to the processor 21, and these remote memories may be connected to the device associated with the batch cloud service via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0223] The one or more modules are stored in the memory 22, and when executed by the one or more processors 21, execute the method of associating devices in batches with cloud services in any of the above method embodiments, for example, execute the method steps of the method of associating devices in batches with cloud services described above.
[0224] When the processor 21 executes the method for batch associating devices with cloud services as described in Examples 1 to 3, the devices for batch associating cloud services can specifically be target discovery devices, that is, the target discovery device can implement the following method: determine the device information of target candidate devices, wherein the target candidate devices include the target discovery device; display the device information of the target candidate devices so as to filter out the device information of the target associated devices from the device information of the target candidate devices; send the acquired organization code and the device information of the target associated devices to the cloud service device so as to facilitate batch association of the cloud service device.
[0225] When the processor 21 executes the method for batch associating devices with cloud services as described in Example 4, the devices for batch associating cloud services can specifically be cloud service devices, and the cloud service devices can specifically implement the following method: sending the acquired device information of the target candidate devices to the target discovery device; receiving the organization code sent by the target discovery device and the device information of the target associated devices filtered out from the device information of the target candidate devices; and batch associating the device information of the target associated devices to the organization code.
[0226] The above-mentioned product can execute the method provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided in the embodiment of the present application.
[0227] Furthermore, if Fig.11As shown, the batch-associated cloud service device may also include: Wi-Fi device 23, display screen 24, Bluetooth device 25, audio circuit 26, power system 27, peripheral interface 28, sensor module 29, data conversion module 30 and other components. These components can communicate through one or more communication buses or signal lines. Those skilled in the art will understand that Fig.11 The hardware structure shown in the figure does not constitute a limitation on the device for batch-associated cloud services. The device for batch-associated cloud services may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0228] The processor 21 is the control center of the device for batch-associated cloud services, and uses various interfaces and lines to connect various parts of the device for batch-associated cloud services, and executes various functions and processes data of the device for batch-associated cloud services by running or executing applications stored in the memory 22, and calling data and instructions stored in the memory 22. In some embodiments, the processor 21 may include one or more processing units; the processor 21 may also integrate an application processor 21 and a modem processor 21; wherein the application processor 21 mainly processes the operating system, user interface, and application programs, and the modem processor 21 mainly processes wireless communications. It is understandable that the above-mentioned modem processor 21 may not be integrated into the processor 21.
[0229] In some other embodiments of the present application, the processor 21 may further include an AI chip. The learning and processing capabilities of the AI chip include image understanding capabilities, natural language understanding capabilities, and speech recognition capabilities, etc. The AI chip can enable devices that are batch-associated with cloud services to have better performance, longer battery life, and better security and privacy. For example, if a device that is batch-associated with a cloud service processes data through the cloud, the data needs to be uploaded for processing before the result is returned, which is very inefficient under existing technical conditions. If the local end of the device that is batch-associated with a cloud service has a strong AI learning capability, then the device that is batch-associated with a cloud service does not need to upload the data to the cloud, but can process it directly on the local end, thereby improving the security and privacy of the data while improving processing efficiency.
[0230] The memory 22 is used to store applications and data. The processor 21 executes various functions and data processing of the devices of batch-associated cloud services by running the applications and data stored in the memory 2212. The memory 22 mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system and applications required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created when using the devices of batch-associated cloud services (such as audio data, video data, etc.). In addition, the memory 22 may include a high-speed random access memory 22, and may also include a non-volatile memory 22, such as a disk memory 22, a flash memory device or other non-volatile solid-state memory 22, etc. The memory 22 can store various operating systems, such as an operating system developed by Apple, an operating system developed by Microsoft, etc.
[0231] The display screen 24 is used to display images, videos, etc. The display screen 24 can be a touch screen. In some embodiments, the device for batch-associated cloud services may include 1 or N display screens 24, where N is a positive integer greater than 1. The device for batch-associated cloud services implements the display function through a GPU, a display screen 24, and an application processor 21. The GPU is a microprocessor 21 for image processing, which connects the display screen 24 and the application processor 21. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 21 may include one or more GPUs, which execute program instructions to generate or change display information.
[0232] The Wi-Fi device 23 is used to provide network access that complies with Wi-Fi-related standard protocols for devices that are associated with cloud services in batches. Devices that are associated with cloud services in batches can access Wi-Fi access points through the Wi-Fi device 23, which helps to browse web pages and access streaming media, etc. It provides users with wireless broadband Internet access. Devices that are associated with cloud services in batches can also establish a Wi-Fi connection with a terminal device connected to the Wi-Fi access point through the Wi-Fi device 23 and the Wi-Fi access point for mutual data transmission. In some other embodiments, the Wi-Fi device 23 can also serve as a Wi-Fi wireless access point, which can provide Wi-Fi network access for other electronic devices. Exemplarily, the Wi-Fi device 23 includes a first wireless network card, a second wireless network card, and a third wireless network card.
[0233] The Bluetooth device 25 is used to implement data exchange between devices associated with the cloud service in batches and other short-range electronic devices (such as terminals, smart watches, etc.) The Bluetooth device 25 in the embodiment of the present application can be an integrated circuit or a Bluetooth chip.
[0234] The audio circuit 26, the speaker, and the microphone can provide an audio interface between the user and the devices associated with the cloud service in batches. The audio circuit 26 can convert the received audio data into an electrical signal and transmit it to the speaker, which then converts it into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is then received by the audio circuit 26 and converted into audio data, and then the audio data is sent to the terminal via the Internet, Wi-Fi network, or Bluetooth, or the audio data is output to the memory 22 for further processing.
[0235] The power system 27 is used to charge various components of the devices associated with the cloud service in batches. The power system 27 may include a battery and a power management module. The battery may be logically connected to the processor 21 through a power management chip, so that the power system 27 can manage charging, discharging, power consumption and other functions.
[0236] The peripheral interface 28 is used to provide various interfaces for external input / output devices (external display, external memory 22, user identification module card, etc.). For example, the storage capacity of devices associated with the cloud service in batches can be expanded by connecting to the external memory 22 through the external memory 22 interface, such as a MicroSD card. The peripheral interface 28 can be used to couple the above-mentioned external input / output peripheral devices to the processor 21 and the memory 22.
[0237] The sensor module 29 may include at least one sensor. For example, a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor. Among them, the ambient light sensor can adjust the brightness of the display screen 24 according to the brightness of the ambient light. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the device posture of batch-associated cloud services (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), etc. Of course, according to actual needs, the sensor module 29 may also include any other feasible sensors.
[0238] The data conversion module 30 may include a digital-to-analog converter and an analog-to-digital converter. The relevant functions of the digital-to-analog converter and the analog-to-digital converter can be referred to the corresponding explanations in the above-mentioned related technical terms, which will not be repeated here.
[0239] An embodiment of the present application also provides a non-volatile computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors, for example, to execute the method steps of the method for associating devices in batches with cloud services described above.
[0240] An embodiment of the present application also provides a computer program product, including a computer program stored on a non-volatile computer-readable storage medium, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method for associating devices in batches with cloud services in any of the above method embodiments, for example, executing the method steps of the method for associating devices in batches with cloud services described above.
[0241] It should be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0242] Through the description of the above implementation methods, ordinary technicians in this field can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Ordinary technicians in this field can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0243] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for associating devices in batches with cloud services, characterized in that: The method for associating devices in batches with cloud services includes: Determine device information of a target candidate device, wherein the target candidate device includes a target discovery device; Displaying device information of target candidate devices, so as to filter out device information of target associated devices from the device information of target candidate devices; The obtained organization code and the device information of the target associated device are sent to the cloud service device so that the cloud service device can perform batch association.
2. The method for associating devices in batches with cloud services according to claim 1, characterized in that: The target candidate devices are all in the same local area network, and the target candidate devices also include at least one discovered device; The device information of the target candidate device to be determined includes: The target discovery device sends a discovery message to the outside and receives a response message based on the discovery message; Parse the response message to obtain device information of the discovered device in the local area network; The device information of the target discovery device is obtained by itself.
3. The method for associating devices in batches with cloud services according to claim 1, characterized in that: The device information of the target candidate device to be determined includes: The target discovery device sends a discovery message to the outside, and receives a response message based on the discovery message, wherein the target discovery device is in the first local area network; Collecting a first public network IP pool in the first local area network based on the response message; Sending the first public IP pool to the cloud service device so that the cloud service device can obtain the target candidate device according to the first public IP pool; Receive device information of a target candidate device from a cloud service device.
4. The method for associating devices in batches with cloud services according to claim 3, characterized in that: The collecting the first public network IP pool in the first local area network based on the response message includes: Parse the response message to obtain the public IP address of each discovered device in the first local area network; The public IP addresses of each discovered device in the first local area network and the public IP address of the target discovered device itself are collected to obtain a first public IP pool.
5. The method for associating devices in batches with cloud services according to claim 3 or 4, characterized in that: When there is a first extension device that does not belong to the first local area network among the first candidate devices obtained by the cloud service device according to the first public IP pool, the first public IP pool is extended by the second public IP pool collected by the first extension device in the local area network where the first extension device is located to generate a new first public IP pool; The receiving device information of the target candidate device from the cloud service device includes: Receive device information of the target candidate device obtained from the cloud service device based on the new first public IP pool.
6. A method for associating devices in batches with cloud services, characterized in that: The method for associating devices in batches with cloud services includes: Send the acquired device information of the target candidate device to the target discovery device; Receiving the organization code sent by the target discovery device and the device information of the target associated device screened from the device information of the target candidate device; Batch associate the device information of the target associated devices to the organization code.
7. The method for associating devices in batches with cloud services according to claim 6, characterized in that: The sending of the acquired device information of the target candidate device to the target discovery device includes: Receive a first public IP pool from a target discovery device; The pre-established relationship database is traversed according to the first public network IP pool to obtain device information of the target candidate device.
8. The method for associating devices in batches with cloud services according to claim 7, characterized in that: The step of traversing the pre-established relationship database according to the first public network IP pool to obtain device information of the target candidate device includes: Acquire device information of the first candidate device according to the first public network IP pool collected by the target discovery device; Determine the local area network belonging status of the first candidate device according to the device information of the first candidate device; The device information of the first candidate device is expanded according to the local area network belonging status of the first candidate device, so as to use the expanded device information of the first candidate device as the device information of the target candidate device.
9. The method for associating devices in batches with cloud services according to claim 8, characterized in that: The target discovery device is located in the first local area network; The step of expanding the device information of the first candidate device according to the local area network belonging status of the first candidate device to use the expanded device information of the first candidate device as the device information of the target candidate device includes: When all of the first candidate devices belong to the first local area network, using the device information of the first candidate devices as the device information of the final target candidate devices; When there is a first extension device that does not belong to the first local area network among the first candidate devices, receiving a second public network IP pool of the local area network where the first extension device is located collected by the first extension device; Expanding the first public IP pool according to the second public IP pool to obtain a new first public IP pool; The device information of the first candidate device is expanded according to the new first public network IP pool, so that the expanded device information of the first candidate device is used as the device information of the target candidate device.
10. The method for associating devices in batches with cloud services according to claim 9, characterized in that: The step of expanding the first public IP pool according to the second public IP pool to obtain a new first public IP pool includes: If the second public IP pool contains an extended public IP address that is not included in the first public IP pool, determining device information of a second candidate device corresponding to the extended public IP address; If it is determined according to the device information of the second candidate device that there is no second extended device belonging to the local area network to be collected in the second candidate device, then the extended public IP address is added to the first public IP pool to obtain a new first public IP pool; If it is determined according to the device information of the second candidate device that there is a second extension device belonging to the local area network to be collected in the second candidate device, then the third public IP pool that is continuously collected by the second extension device in the local area network to be collected is received, and the first public IP pool that has been extended to include the extended public IP address is continuously extended according to the third public IP pool until a preset condition is met, then the extension of the first public IP pool is stopped to obtain a new first public IP pool; Among them, the LAN to be collected is a LAN that has not collected public IP addresses.
11. A device for batch associating cloud services, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for batch associating devices with cloud services as described in any one of claims 1-5 or the method for batch associating devices with cloud services as described in any one of claims 6-10.