Equipment access method and device of intelligent Internet of Things platform, electronic equipment and product

By using sharding technology to segment instances in the intelligent IoT platform, the scalability and performance challenges during large-scale device access are solved, and the fine-grained management of device access and the guarantee of platform performance is achieved.

CN119996459APending Publication Date: 2025-05-13BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510186997.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-19
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

When facing large-scale device access, smart IoT platforms have scalability and performance challenges, including bottlenecks in the scale of MQTT proxy cluster nodes, bottlenecks in the maximum number of connections of four-layer load balancing components, bottlenecks in the basic component capabilities of the server and bottlenecks in the expansion of business components.

Method used

Through sharding technology, the instances of the intelligent IoT platform are segmented. Each shard independently carries device access and data processing of different equipment levels to achieve finer granular management. The device determines the corresponding shard based on its information during access, and obtains the access address of the shard through shard query request for access.

Benefits of technology

Through sharding technology, the intelligent IoT platform ensures that the overall performance is not affected when large-scale equipment access is accessed, and realizes flexible expansion and scaling of examples, providing effective guarantees for large-scale equipment access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996459A_ABST
    Figure CN119996459A_ABST
Patent Text Reader

Abstract

The invention discloses an equipment access method and device of an intelligent Internet of Things platform, electronic equipment and a product, and aims to realize finer-grained management on instances in the intelligent Internet of Things platform based on a fragmentation technology, so that flexible capacity expansion and contraction of the instances can be realized, and effective guarantee can be provided for access of large-scale equipment. The device access method comprises the following steps: receiving a fragment query request sent by a first device to a first instance in an intelligent Internet of Things platform, wherein the fragment query request carries device information of the first device; determining a first fragment corresponding to the first equipment in at least one fragment included in the first instance according to the equipment information of the first equipment and a mapping relationship between equipment and fragments stored in the first instance; and returning the access address of the first fragment to the first device, so that the first device accesses the first fragment in the intelligent Internet of Things platform based on the access address.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of Internet of Things, and in particular, to a device access method, apparatus, electronic equipment and product for an intelligent Internet of Things platform. Background Art

[0002] Artificial Intelligence of Things Platform (AIoT) is a comprehensive platform that integrates artificial intelligence (AI) and Internet of Things (IoT) technologies. With the continuous introduction of new smart terminals and smart devices, from smart phones to smart home devices, from smart wearable devices to industrial smart sensors, the number of various smart terminals and smart devices is increasing day by day. Faced with the access of large-scale devices, the scalability and performance of the smart IoT platform are extremely challenging. Summary of the invention

[0003] This section is provided to introduce the concepts in a brief form, which will be described in detail in the detailed implementation section below. This section is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to be used to limit the scope of the technical solution claimed for protection.

[0004] In a first aspect, the present disclosure provides a device access method for a smart Internet of Things platform, the device access method comprising: Receive a shard query request sent by a first device to a first instance in the smart Internet of Things platform, where the shard query request carries device information of the first device; Determine, according to the device information of the first device and the mapping relationship between devices and slices stored in the first instance, a first slice corresponding to the first device in at least one slice included in the first instance; The access address of the first shard is returned to the first device, so that the first device accesses the first shard in the smart Internet of Things platform based on the access address.

[0005] In a second aspect, the present disclosure provides a device access method for an intelligent Internet of Things platform, the device access method comprising: Receive an access address of a first shard corresponding to a first device from the smart Internet of Things platform; When the access address of the first shard is within a validity period, access the first shard in the smart Internet of Things platform based on the access address of the first shard.

[0006] In a third aspect, the present disclosure provides a device access apparatus for a smart Internet of Things platform, the device access apparatus comprising: A request receiving module, configured to receive a shard query request sent by a first device to a first instance in the smart Internet of Things platform, wherein the shard query request carries device information of the first device; a determination module, configured to determine, according to the device information of the first device and the mapping relationship between devices and slices stored in the first instance, a first slice corresponding to the first device in at least one slice included in the first instance; A returning module is used to return the access address of the first shard to the first device, so that the first device accesses the first shard in the smart Internet of Things platform based on the access address.

[0007] In a fourth aspect, the present disclosure provides a device access apparatus for a smart Internet of Things platform, the device access apparatus comprising: An address receiving module, used to receive an access address of a first shard corresponding to a first device from a smart Internet of Things platform; An access module is used to access the first shard in the smart Internet of Things platform based on the access address of the first shard when the access address of the first shard is within a validity period.

[0008] In a fifth aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect or the second aspect.

[0009] In a sixth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method in the first aspect or the second aspect.

[0010] In a seventh aspect, the present disclosure provides a computer program product, comprising a computer program, which implements the steps of the method described in the first aspect or the second aspect when executed by a processor.

[0011] Through the above technical solution, after receiving the shard query request sent by the first device to the first instance in the smart Internet of Things platform, the first shard corresponding to the first device can be determined in at least one shard included in the first instance according to the device information of the first device and the mapping relationship between the device and the shard stored in the first instance, and then the access address of the first shard is returned to the first device, so that the first device can access the first shard in the smart Internet of Things platform based on the access address. By adopting this method, based on the sharding technology, a more fine-grained management of the instances in the smart Internet of Things platform can be achieved, so that the device can access the corresponding shard when accessing the smart Internet of Things platform. Since each shard can independently carry the device access and data processing of different device levels, the overall performance of the platform is not affected during the access of large-scale devices, and the instance can also be flexibly expanded and reduced according to the shards of different device levels, providing effective protection for the access of large-scale devices.

[0012] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 is a schematic diagram of an architecture of a smart Internet of Things platform according to an exemplary embodiment of the present disclosure; Figure 2 It is a flowchart of a method for accessing a device of a smart Internet of Things platform according to an exemplary embodiment of the present disclosure; Figure 3 is a schematic diagram of an architecture of a smart Internet of Things platform according to an exemplary embodiment of the present disclosure; Figure 4 is a schematic diagram showing a process of dynamically adding shards according to an exemplary embodiment of the present disclosure; Figure 5 is a schematic diagram showing a device registration process according to an exemplary embodiment of the present disclosure; Figure 6 is a schematic diagram of a process of device accessing a platform according to an exemplary embodiment of the present disclosure; Figure 7 is a schematic diagram of a process of querying an access address of a shard according to an exemplary embodiment of the present disclosure; Figure 8 It is a flowchart of a method for accessing a device of a smart Internet of Things platform according to an exemplary embodiment of the present disclosure; Fig. 9 It is a structural block diagram of a device access apparatus for a smart Internet of Things platform according to an exemplary embodiment of the present disclosure; Fig.10 It is a structural block diagram of a device access apparatus for a smart Internet of Things platform according to an exemplary embodiment of the present disclosure; Fig.11 It is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0014] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0015] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0016] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0017] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0018] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0019] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0020] All actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where they are located, and with the authorization given by the owner of the corresponding device.

[0021] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0022] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0023] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0024] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0025] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0026] The AIoT platform in the related technology mainly uses the MQTT (Message Queuing Telemetry Transport) protocol to realize the access of devices to the platform, and logically manages the devices according to the dimensions of instances, products, devices, etc. Instances can be understood as a collection of computing, storage, network and other resources or basic components of different specifications provided by the smart IoT platform to users. For example, manufacturer X of smart home devices purchases instance Y on the smart IoT platform to access the smart home devices produced by manufacturer X. In order to facilitate the management of smart home devices, they can be classified according to different product types, such as smart speaker products, smart air conditioning products, etc. Under the same product type, multiple specific devices can be included, for example, the smart speaker product classification includes smart speaker 1, smart speaker 2, etc. Management according to the dimensions of instances, products, devices, etc., on the one hand, is convenient for platform users to manage and maintain devices and data, and on the other hand, it is also convenient for the platform to allocate, manage and bill various resources.

[0027] The device access architecture of the smart IoT platform is as follows: Figure 1 As shown in the figure, given the maximum number of connections for a single MQTT proxy, in order to achieve large-scale device access, the smart IoT platform will use a load balancing component to distribute the MQTT TCP (Transmission Control Protocol) connections from devices to multiple MQTT proxies. MQTT proxies usually form a cluster, and each proxy completes the necessary device connection session synchronization, such as Figure 1 As shown, both the device side and the business side can view it as a whole, which facilitates unified access on the device side and ensures the two-way interaction and unification of message subscription and publishing between the device side and the business side.

[0028] The intelligent IoT platform faces the following challenges in terms of scalability and performance when large-scale device access and the number of device accesses continues to grow dynamically: 1. MQTT proxy cluster node scale bottleneck: In order to achieve larger-scale device access, the number of nodes in the MQTT proxy cluster needs to be increased. At the same time, to ensure consistency, the information interaction between nodes will become more frequent and complex. In actual business scenarios, considering the total number of device access, the number of subscription and publication topics of a single device, the frequency of message interaction, the size of the message body and other factors, in order to avoid performance and reliability problems, the number of nodes in a single MQTT proxy cluster will not be too large, thereby limiting the number of device accesses to a single instance.

[0029] 2. Bottleneck of the maximum number of connections of the four-layer load balancing component: The four-layer refers to the transport layer. Large-scale MQTT connections pose a challenge to the maximum number of connections of the four-layer load balancing component. In order to achieve larger-scale device access, the four-layer load balancing component needs to be horizontally expanded. Usually, the four-layer load balancing component has a corresponding maximum specification. In order to increase the maximum number of connections of the four-layer load balancing component and achieve tens of millions or even hundreds of millions of four-layer connections, it is necessary to pre-plan exclusive resources for the load balancing component, which increases the resource and maintenance burden and reduces the flexibility of resource expansion and contraction.

[0030] 3. Capacity bottleneck of basic components on the server side of the smart IoT platform: The basic components on the server side of the smart IoT platform will also face great pressure in terms of computing, networking, and storage, especially for services that are sensitive to data reliability and latency. With the increasing number of devices and the storage and access of data, the basic components on the server side of the smart IoT platform, such as various databases, caches, and message queues, face high challenges in terms of performance, reliability, scalability, and maintainability.

[0031] 4. Bottlenecks in the expansion of business components of the smart IoT platform: The smart IoT platform logically manages devices according to dimensions such as instances, products, and devices. For example, a purchasable AIoT instance sets an upper limit on the number of devices that can be connected, a message processing TPS upper limit, etc., and corresponding business component specifications are allocated to this specification. However, when the number of devices exceeds the pre-defined upper limit of a specific dimension, simple resource expansion will cause the underlying resources and business components to encounter various bottlenecks.

[0032] In view of this, the present disclosure provides a device access method, apparatus, electronic device and product for a smart Internet of Things platform to solve the above technical problems.

[0033] The platform side of the embodiment of the present disclosure is further explained below in conjunction with the accompanying drawings.

[0034] Figure 2 is a flow chart of a device access method for a smart Internet of Things platform according to an exemplary embodiment of the present disclosure, referring to Figure 2 , the method may include the following steps: S201: Receive a shard query request sent by a first device to a first instance in a smart Internet of Things platform, where the shard query request carries device information of the first device.

[0035] The first device is a registered device of the first instance.

[0036] S202: Determine a first slice corresponding to the first device in at least one slice included in the first instance according to the device information of the first device and the mapping relationship between the device and the slice stored in the first instance.

[0037] In a possible manner, the intelligent Internet of Things platform includes at least one instance, each instance includes at least one shard, and each shard includes resources required to access a corresponding preset number of devices. The at least one shard included in the first instance is created in the following manner: in response to a shard configuration operation on the first instance, determining shard parameter information corresponding to the shard configuration operation, the shard parameter information at least including the target number of devices; determining target resources required for devices of the target number of devices according to the shard parameter information, and creating a second shard of the first instance based on the target resources.

[0038] For example, the device access architecture of the smart Internet of Things platform provided by the embodiment of the present disclosure is as follows: Figure 3 As shown, the instance is divided based on the sharding technology. Each shard corresponds to the smallest unit of computing, storage, and network resources that can be independently allocated and managed under an instance. The components and capabilities contained in a single shard are equivalent to an instance in the related technology. The difference is that the device information is stored in the shard dimension.

[0039] For example, the expansion of the instance can be achieved by creating shards. When the instance needs to create a new shard, the shard parameter information can be configured on the shard creation page provided by the platform, and then the shard management component applies for the corresponding computing, storage and network resources based on the shard parameter information to complete the creation of the shard. The shard parameter information can be the estimated number of device accesses or the specific component specifications, such as the specifications of the four-layer load balancing component, the number of MQTT proxy cluster nodes, etc. The shard parameter information can be determined based on user needs or actual business conditions, and this disclosure does not specifically limit this. In addition, the shard information can also be maintained in the instance database and cache corresponding to the instance.

[0040] For example, the upper limit of the access device or the upper limit of the resource applied for the shard can also be limited. For example, the number of access devices or the upper limit of the resource for the best performance can be determined according to the actual situation, and the present disclosure does not limit this. In addition, one or more shards can be created according to the shard parameter information. For example, if the target number of devices configured by the user is 5 million, and the upper limit of the access device is 2 million, then shards 1 and 2 of the 2 million level and shards 3 of the 1 million level can be automatically created to meet the user's needs. In addition, it is also possible to directly provide the user with an instance including multiple shards, etc., and the present disclosure does not limit this. This can simplify the user's configuration operation and flexibly create shards automatically according to user needs.

[0041] S203: Return the access address of the first shard to the first device, so that the first device accesses the first shard in the smart Internet of Things platform based on the access address.

[0042] By adopting the above method, based on the sharding technology, a more fine-grained management of the instances in the smart IoT platform can be achieved, so that the device can access the corresponding shard when accessing the smart IoT platform. Since each shard can independently carry the device access and data processing of different device levels, the overall performance of the platform is not affected during the access of large-scale devices. In addition, the instance can be flexibly expanded and reduced according to the shards of different device levels, providing effective protection for the access of large-scale devices.

[0043] It is worth noting that if Figure 4 As shown in the figure, the specifications of the shards can be determined based on the number of devices connected according to business needs, resource scheduling of the intelligent IoT platform, or the specifications of each component. For example, a single shard can carry 100,000 or 1 million devices for access and data processing. In the later stage, according to business expansion and device load, different specifications of shards can be dynamically added to the instance to achieve large-scale device access in the instance or product dimension under the instance. Figure 3 As shown, the shard management component can be responsible for creating, updating, deleting, querying, and other operations on the shards in the instance.

[0044] In a possible manner, the device access method also includes: in response to a deletion operation on the third shard in the first instance, determining whether there are other shards in the first instance that can migrate the devices in the third shard; if there are other shards in the first instance, migrating the devices in the third shard to the other shards, deleting the third shard and the mapping relationship corresponding to the third shard stored in the first instance, and updating the mapping relationship between the device and the shard stored in the first instance based on the mapping relationship between the migrated device and the other shards.

[0045] For example, you can reduce the size of an instance by deleting shards. Figure 4 As shown, assuming that the user needs to delete shard 3, the shard management component will try to migrate the devices in shard 3 to at least one of shards 1 and shard 2. If the number of remaining accessible devices in shard 1 and shard 2 is less than the number of devices in shard 3, the deletion operation fails. If the number of remaining accessible devices in shard 1 and shard 2 is greater than or equal to the number of devices in shard 3, the devices in shard 3 can be migrated to at least one of shards 1 and shard 2.

[0046] It should be noted that during the migration process, the migrated device can be accessed immediately. In addition, corresponding to the shard creation and deletion operations, the shard management component will update the shard, including the update of the shard resources and the update of the shard information and mapping relationship.

[0047] For example, corresponding to the shard deletion operation, after the migration is completed, the resources corresponding to the shard will be deleted, the shard information in the instance database or cache will be deleted, and the mapping relationship between the migrated device and the new shard will be updated, and so on.

[0048] For example, since the devices are stored in various shards in a dispersed manner, the instance database of the AIoT platform will maintain the mapping relationship between the devices and the shards, for example, the mapping relationship is stored in the form of a <(ProductKey, DeviceName), SliceID> tuple. Among them, (ProductKey, DeviceName) is the keyword of the tuple, representing the product keyword and the device name, that is, the product ID and the device ID, and SliceID is the value of the tuple, representing the shard ID. The mapping relationship can also be stored in the form of a tuple including a device ID and a shard ID, as long as the device ID can represent a unique device, which can be determined according to the needs, and the present disclosure does not limit this.

[0049] In addition, the smart IoT platform also provides a query function, which can query the slicing corresponding to the device through the device information. That is, given the above tuple (ProductKey, DeviceName), the SliceID and the corresponding slicing information are obtained by querying, such as the four-layer load balancing components under the slicing, MQTT proxy cluster, slicing business components, slicing-level database, cache and other slicing components. The present disclosure does not impose any restrictions on this.

[0050] In a possible manner, the mapping relationship between devices and shards stored in the first instance is determined in the following manner: receiving a device registration request for the first instance from at least one second device to be registered, each device registration request carrying device information corresponding to the second device; for each second device, determining a fourth shard corresponding to the second device from at least one shard included in the first instance based on a preset sharding strategy; determining a mapping relationship between devices and shards based on the device information of each second device and the shard information of its corresponding shard.

[0051] It should be noted that the smart IoT platform supports multiple device registration methods, including single / batch device creation, batch device import, dynamic device registration, etc. In essence, they all create device information under the AIoT instance or corresponding product, including device name (DeviceName) and device secret key (DeviceSecret), etc., and then the device can use this information to access the smart IoT platform.

[0052] For example, Figure 5As shown, the device registration request of the receiving device can be triggered by various device methods such as the front end of the smart IoT platform, the device SDK (Software Development Kit), or the business components provided by the smart IoT platform, and the present disclosure does not limit this. Then, the shard management component checks the number of devices in the instance database or the cached shard information, including the upper limit of the shard device, the total number of current shard devices, etc., and the present disclosure does not limit this.

[0053] Then, the shard management component selects the target shard according to the preset shard strategy, and in a possible manner, determines the fourth shard corresponding to the second device from at least one shard included in the first instance based on the preset shard strategy, including: determining the shard with the largest number of remaining registrable devices in at least one shard included in the first instance as the fourth shard corresponding to the second device; or, determining the shard with the same belonging region as the second device in at least one shard included in the first instance as the fourth shard corresponding to the second device.

[0054] For example, the remaining number of registrable devices of each shard under the instance can be compared, and the shard with the largest number of remaining registrable devices can be selected as the target shard corresponding to the device. The region of ownership of each shard can also be matched according to the region of ownership of the device, and the shards with the same region of ownership can be determined as the fourth shard corresponding to the second device, wherein the region of ownership of the four-layer load balancing component of the shard can be used as the region of ownership of the shard, and the present disclosure does not limit this. This sharding strategy enables device access to obtain lower latency and more stable connections. In addition, other sharding strategies can be configured as required, and the present disclosure does not limit this.

[0055] Furthermore, the device registration request is sent to the shard service component of the target shard to complete the registration. In a possible manner, the device access method further includes: forwarding the device registration request of the second device to the shard service component corresponding to the fourth shard through the shard management component of the first instance, so that the shard service component stores the device information of the second device in the shard database corresponding to the fourth shard, and the shard database corresponding to the fourth shard is at least used to store the access address of the fourth shard and the device information of the registered device of the fourth shard; and storing the mapping relationship between the second device and the fourth shard in the instance database corresponding to the first instance through the shard management component.

[0056] For example, a device registration request is sent to the selected target shard, and then the shard service component creates the device and stores the device information carried in the device registration request in the shard database or cache to complete the device registration. After the shard service component successfully stores the device information, the shard management component stores the mapping relationship between the device and the shard in the instance database or cache, and returns the device registration result to the device.

[0057] In a possible manner, returning the access address of the first shard to the first device includes: querying the access address of the first shard in a shard database corresponding to the first shard, and returning the queried access address of the first shard to the first device, wherein the shard database corresponding to the first shard is at least used to store the access address of the first shard.

[0058] For example, through multi-level storage, it is easy to manage different information. For example, when the shard management component receives a shard query request sent by a device, it can quickly determine the shard corresponding to the device based on the instance database or cache, and then query the shard database or cache for shard information such as the access address of the shard.

[0059] Of course, in other possible implementations, shard information such as the access address of the shard may also be stored in the instance database or cache, and the present disclosure does not limit this.

[0060] It should be noted that the instance of device registration is fixed, but the specific shard may change with the deletion or creation of the shard. Therefore, after the device completes registration, it can send a shard query request to the instance based on the device information to query the corresponding shard for access. Usually, the device side will use the SDK provided by the smart IoT platform to implement device access and message subscription and publishing. For example, the device shard query operation is integrated into the SDK, and then the device shard query operation can be completed before the MQTT connection between the device and the shard is established to obtain the access address of the shard corresponding to the device.

[0061] like Figure 6 As shown in , before the device initiates a shard query request, you can first check whether the local cache has a valid shard query result. The shard query result includes the access address of the shard to which the device belongs. If the cached shard query result within the valid period is not found locally, such as Figure 3 As shown, the device initiates a shard query request to the instance, and forwards the message to the shard management component through the seven-layer load balancing component, where the seven-layer is the application layer. Then, the shard management component queries the shard corresponding to the device from the instance database or cache to return the shard query result including the access address of the shard to the device.

[0062] Continue to refer to Figure 6, the device caches the shard query results locally and sets a validity period for it. During the validity period, the access address of the locally cached shard can be directly reused without initiating a shard query request again. When the shard query result is within the validity period, the device-side SDK can establish an MQTT connection based on the device information and the access address of the shard. The parameters required for the MQTT connection include the four-layer load balancing domain name / IP address, AIoT instance ID (InstanceID), product keyword (ProductKey), product secret key (ProductSecret), device name (DeviceName), device secret key (DeviceSecret) and other parameters. The specific settings can be based on demand, and this disclosure does not impose any restrictions on this. The device-side SDK then initiates an MQTT connection establishment request to connect the device to the corresponding shard.

[0063] In a possible manner, the device information of the first device includes identification information of the first device, and the shard query request also includes a timestamp and a first authentication token, the first authentication token is generated by the first device according to a first agreed policy based on the timestamp, the identification information and the key information of the first device, and the access address of the first shard is returned to the first device, including: obtaining the key information of the first device by querying the shard database corresponding to the first shard based on the identification information of the first device, and the shard database corresponding to the first shard stores the key information of the first device; generating a second authentication token according to the first agreed policy based on the timestamp, the identification information and the key information of the first device; and returning the access address of the first shard to the first device when the first authentication token and the second authentication token are the same.

[0064] For example, Figure 3 As shown, the access address of the query shard can be obtained based on the shard query request of HTTP (HyperText Transfer Protocol). The shard query request usually contains the necessary information for authenticating the device. For example, the product keyword, product key, device name, device key and timestamp and other additional information can be processed according to the agreed strategy, such as the agreed hash rule to obtain an authentication token. The specific information can be determined according to the needs, and the present disclosure does not limit this. Then the product keyword, device name, timestamp and authentication token are used as HTTP request parameters.

[0065] For example, continue to refer to Figure 3, the device sends an HTTP request to the seven-layer load balancing component of the AIoT instance, and the seven-layer load balancing component further forwards the request to the shard management component. The shard management component queries the shard where the device is located based on the product keyword and device name through the mapping relationship between devices and shards in the instance database or cache, and then queries the device information stored in the shard, including the product key and device key. The shard management component performs the same hash processing based on the product key, product key, device name, device key and additional information such as the timestamp in the request to obtain a calculated authentication token, and compares it with the authentication token in the request. If they are the same, it means that the device authentication is successful and the access address of the shard is returned. If they are different, the authentication fails.

[0066] Of course, when the device identifier can represent a unique device, product-related information can be omitted in the above process. The specific information can be determined according to needs, and the present disclosure does not limit this.

[0067] In a possible manner, returning the access address of the first shard to the first device includes: according to the device information of the first device, parsing the access address of the first shard from the stored encrypted mapping information according to the second agreed policy through a preset interface, and returning the access address of the first shard to the first device; wherein the encrypted mapping information is generated based on the device information corresponding to each registered device, the belonging region and the access address of the shard corresponding to the registered device according to the second agreed policy, and the stored encrypted mapping information is periodically updated.

[0068] For example, the above-mentioned shard query process can also be implemented by using the extended HTTPDNS (HTTP Domain Name System, a domain name system resolution service based on the HTTP protocol) or DoH (DNS over HTTPS, a method of performing DNS query through the HTTPS protocol). Figure 7 As shown, the device sends an HTTP request carrying device information to the HTTPDNS / DoH service or component integrated or used by the smart IoT platform, which assists in resolving the access address of the shard according to the interface provided by the shard management component, and the HTTPDNS / DoH service or component returns the resolved access address of the shard, completing the DNS resolution.

[0069] For example, continue to refer to Figure 7The shard management component can combine the device's region in the shard strategy to obtain encrypted mapping information based on the agreed hash rules, and synchronize the encrypted mapping information to the HTTPDNS server. The encrypted mapping information can include the mapping relationship between product keywords, device names, regions, and access addresses. In this way, the device can quickly query the mapping relationship between the device and the shard through the HTTPDNS server according to the interface provided by the shard management component. It is not necessary to access the shard management component to complete the shard query every time a shard query request is made, which reduces the access pressure on the shard management component.

[0070] For example, the shard management component can periodically update the encrypted mapping information, and the update interval can be determined according to the validity period of the access address, which is not limited by the present disclosure. In addition, when the HTTPDNS server does not have a matching mapping relationship between the device and the shard, the shard management component can be accessed by initiating a shard query request similar to the above to obtain the access address of the shard corresponding to the device.

[0071] In a possible manner, returning the access address of the first shard to the first device includes: returning the first address corresponding to the message proxy cluster node in the first shard to the first device; or, returning the second address corresponding to the four-layer load balancing component in the first shard to the first device.

[0072] For example, Figure 3 As shown, the domain name / IP address corresponding to the sharded MQTT proxy cluster node can be returned to the first device. When the MQTT proxy cluster node includes multiple nodes, the corresponding domain name / IP address list can be returned, so that the device can access the device based on the MQTT proxy cluster node. Alternatively, the domain name / IP address corresponding to the sharded four-layer load balancing component can be returned to the first device. When the four-layer load balancing component includes multiple nodes, the corresponding domain name / IP address list can be returned, so that the device can dynamically allocate the MQTT proxy cluster node based on the four-layer load balancing component to access the device. The specific details can be determined according to the needs, and the present disclosure does not limit this.

[0073] In a possible manner, the device access method also includes: when the first instance includes a backup shard of the first shard, returning the third address corresponding to the message proxy cluster node in the backup shard to the first device, or returning the fourth address corresponding to the four-layer load balancing component in the backup shard to the first device.

[0074] For example, if there is a backup shard, the domain name / IP address of the MQTT proxy cluster node or the four-layer load balancing component of the backup shard can also be returned according to the preset redundancy strategy. The specific address can be determined according to the needs, and the present disclosure does not impose any restrictions on this.

[0075] Since each shard in the instance can achieve device access based on its own four-layer load balancing component or MQTT proxy cluster, compared with the solution in the related technology that one instance corresponds to one four-layer load balancing component or MQTT proxy cluster, the number of device accesses of a single instance can dynamically increase with the number of shards, and is not limited by the maximum number of device accesses of the four-layer load balancing component or MQTT proxy cluster, thereby achieving large-scale device access.

[0076] It should be noted that the devices in the embodiments of the present disclosure generally refer to various devices with network connection capabilities or gateway devices connected to various sensors. And the protocols such as MQTT, TCP, HTTP in the embodiments of the present disclosure may include scenarios such as enabling secure connections. For the smart Internet of Things platform, it can generally refer to various actual deployment scenarios such as public clouds and privatization. For components such as databases and caches, it can generally refer to various relational databases, document databases, time series databases, cache databases, etc. Among them, the instance-level database or cache is responsible for storing instance information, product information, shard information, and device shard mapping information. The shard-level database or cache maintained by the shard is used for persistence and access of device data, and is responsible for storing information of each shard component such as the four-layer load balancing component under the shard, the MQTT proxy cluster, the business component, the shard-level database / cache, etc. In addition, devices that logically belong to the same product can be stored and accessed across shards, which can be set specifically according to needs, and the present disclosure does not limit this.

[0077] By adopting the above method, through sharding technology, the intelligent IoT platform can manage instances at a finer granularity, realize flexible instance expansion and contraction while ensuring the overall performance of the sharding, and provide effective guarantee for large-scale device access. For example, in the public cloud scenario, the intelligent IoT platform can explicitly or implicitly provide users with instance sharding specifications of different device levels. When the user evaluates that the early device scale of the business is in the millions, an instance of the millions of devices can be opened on the intelligent IoT platform. The instance can select the MQTT cluster specification of a single shard, the four-layer load balancing component specification, the basic components of the intelligent IoT platform, and the business components are all in the millions. As the business grows gradually and the devices gradually increase in volume, users can simply explicitly add shards of appropriate specifications, or implicitly increase the maximum number of devices in the instance by the system automatically, to achieve large-scale device access under a single AIoT instance. The entire process of increasing volume maintains consistency from the logical dimensions of instances, products, and devices, ensuring that the overall performance of the platform is not affected during the large-scale device access process, while maintaining good scalability.

[0078] The device side of the embodiment of the present disclosure is further explained below in conjunction with the accompanying drawings.

[0079] Figure 8is a flow chart of a device access method for a smart Internet of Things platform according to an exemplary embodiment of the present disclosure, referring to Figure 8 , the method may include the following steps: S801: Receive an access address of a first shard corresponding to a first device from a smart Internet of Things platform.

[0080] Among them, the intelligent Internet of Things platform includes at least one instance, each instance includes at least one shard, each shard includes resources required to access a corresponding preset number of devices, the first device is a registered device of the first instance in the intelligent Internet of Things platform, and the first shard is determined by the intelligent Internet of Things platform in at least one shard included in the first instance after receiving a shard query request sent by the first device to the first instance, based on the mapping relationship between the device and the shard stored in the first instance and the device information of the first device carried in the shard query request.

[0081] S802: When the access address of the first shard is within a validity period, access the first shard in the smart Internet of Things platform based on the access address of the first shard.

[0082] In a possible manner, the device access method also includes: when the access address of the first shard is not within the validity period, sending a new shard query request to the first instance in the smart Internet of Things platform based on the device information of the first device, so that the smart Internet of Things platform responds to the new shard query request and returns the access address of the new shard corresponding to the first device, and the first device is a registered device of the first instance.

[0083] In a possible manner, the device access method also includes: sending a device registration request to a first instance in the smart Internet of Things platform, the device registration request carries device information of the first device, so that the smart Internet of Things platform determines the shard corresponding to the first device from at least one shard included in the first instance based on a preset sharding strategy, and determines the mapping relationship between the device and the shard based on the device information of the first device and the shard information of its corresponding shard.

[0084] By adopting the above method, based on the sharding technology, a more fine-grained management of the instances in the smart IoT platform can be achieved, so that the device can access the corresponding shard when accessing the smart IoT platform. Since each shard includes the resources required to access the corresponding preset number of devices, each shard can independently carry the device access and data processing of different device levels, thereby ensuring that the overall performance of the platform is not affected during the access of large-scale devices, and can also realize flexible expansion and reduction of instances according to the shards of different device levels, providing effective protection for the access of large-scale devices.

[0085] It should be noted that the process of the device side initiating device registration requests, shard query requests, and device access requests to interact with the smart Internet of Things platform can refer to the embodiment description on the platform side, and this disclosure will not go into details.

[0086] Based on the same concept, the present disclosure provides a device access device for a smart Internet of Things platform, such as Fig. 9 As shown, the device access device 900 of the smart Internet of Things platform includes: The request receiving module 901 is used to receive a shard query request sent by a first device to a first instance in the smart Internet of Things platform, where the shard query request carries device information of the first device; A determination module 902 is configured to determine, according to the device information of the first device and the mapping relationship between devices and slices stored in the first instance, a first slice corresponding to the first device in at least one slice included in the first instance; The returning module 903 is used to return the access address of the first shard to the first device, so that the first device accesses the first shard in the smart Internet of Things platform based on the access address.

[0087] Optionally, the smart Internet of Things platform includes at least one instance, each instance includes at least one shard, each shard includes resources required to access a corresponding preset number of devices, and the device access device 900 of the smart Internet of Things platform includes a creation module, and the creation module is used to: In response to a shard configuration operation on the first instance, determining shard parameter information corresponding to the shard configuration operation, the shard parameter information at least including a target device quantity; The target resources required by the devices of the target number of devices are determined according to the shard parameter information, and a second shard of the first instance is created based on the target resources.

[0088] Optionally, the device access apparatus 900 of the smart Internet of Things platform includes a deletion module, and the deletion module is used to: In response to a deletion operation on the third shard in the first instance, determining whether there are other shards in the first instance that can migrate devices in the third shard; In the case that the other shards exist in the first instance, the devices in the third shard are migrated to the other shards, the third shard and the mapping relationship corresponding to the third shard stored in the first instance are deleted, and the mapping relationship between the devices and shards stored in the first instance is updated based on the mapping relationship between the migrated devices and the other shards.

[0089] Optionally, the device access apparatus 900 of the smart Internet of Things platform includes a registration module, and the registration module is used to: receiving a device registration request for the first instance from at least one second device to be registered, each of the device registration requests carrying device information corresponding to the second device; For each of the second devices, determining a fourth shard corresponding to the second device from at least one shard included in the first instance based on a preset sharding strategy; A mapping relationship between the device and the slice is determined according to the device information of each second device and the slice information of its corresponding slice.

[0090] Optionally, the registration module is used to: Determine the slice with the largest number of remaining registrable devices in at least one slice included in the first instance as the fourth slice corresponding to the second device; or, A slice having the same belonging region as that of the second device among the at least one slice included in the first instance is determined as a fourth slice corresponding to the second device.

[0091] Optionally, the device access apparatus 900 of the smart Internet of Things platform includes a registration submodule, and the registration submodule is used to: Forwarding the device registration request of the second device to the slice service component corresponding to the fourth slice through the slice management component of the first instance, so that the slice service component stores the device information of the second device in the slice database corresponding to the fourth slice, and the slice database corresponding to the fourth slice is used to store at least the access address of the fourth slice and the device information of the registered device of the fourth slice; The mapping relationship between the second device and the fourth shard is stored in an instance database corresponding to the first instance through the shard management component.

[0092] Optionally, the returning module 903 is used to: The access address of the first shard is queried in the shard database corresponding to the first shard, and the queried access address of the first shard is returned to the first device, wherein the shard database corresponding to the first shard is at least used to store the access address of the first shard.

[0093] Optionally, the device information of the first device includes identification information of the first device, the shard query request also includes a timestamp and a first authentication token, the first authentication token is generated by the first device according to a first agreed policy based on the timestamp, the identification information of the first device, and the key information, and the return module 903 is used to: Based on the identification information of the first device, query the shard database corresponding to the first shard to obtain the key information of the first device, where the shard database corresponding to the first shard stores the key information of the first device; generating a second authentication token according to the first agreed policy based on the timestamp, the identification information of the first device and the key information; When the first authentication token and the second authentication token are the same, the access address of the first shard is returned to the first device.

[0094] Optionally, the returning module 903 is used to: According to the device information of the first device, the access address of the first shard is obtained by parsing the stored encrypted mapping information according to the second agreed policy through a preset interface, and the access address of the first shard is returned to the first device; The encrypted mapping information is generated according to the second agreed policy based on the device information, the belonging region and the access address of the slice corresponding to each registered device, and the stored encrypted mapping information is updated periodically.

[0095] Optionally, the returning module 903 is used to: Returning the first address corresponding to the message proxy cluster node in the first shard to the first device; or, The second address corresponding to the layer-4 load balancing component in the first slice is returned to the first device.

[0096] Optionally, the device access apparatus 900 of the smart Internet of Things platform includes a return submodule, and the return submodule is used to: In the case where the first instance includes a backup shard of the first shard, the third address corresponding to the message proxy cluster node in the backup shard is returned to the first device, or the fourth address corresponding to the four-layer load balancing component in the backup shard is returned to the first device.

[0097] Based on the same concept, the present disclosure provides a device access device for a smart Internet of Things platform, such as Fig.10 As shown, the device access device 100 of the smart Internet of Things platform includes: The address receiving module 101 is used to receive an access address of a first shard corresponding to a first device from a smart Internet of Things platform; The access module 102 is used to access the first shard in the smart Internet of Things platform based on the access address of the first shard when the access address of the first shard is within a validity period.

[0098] Optionally, the device access apparatus 100 of the smart Internet of Things platform includes a sending module, and the sending module is used to: When the access address of the first shard is not within the validity period, a new shard query request is sent to the first instance in the intelligent Internet of Things platform based on the device information of the first device, so that the intelligent Internet of Things platform responds to the new shard query request and returns the access address of the new shard corresponding to the first device, and the first device is a registered device of the first instance.

[0099] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0100] Based on the same concept, an embodiment of the present disclosure also provides a computer-readable medium on which a computer program is stored. When the program is executed by a processing device, the steps of the device access method of the above-mentioned smart Internet of Things platform are implemented.

[0101] Based on the same concept, an embodiment of the present disclosure further provides an electronic device, which may include: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the device access method of the above-mentioned intelligent Internet of Things platform.

[0102] Based on the same concept, an embodiment of the present disclosure also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the device access method of the above-mentioned smart Internet of Things platform.

[0103] Reference below Fig.11 , which shows a schematic diagram of the structure of an electronic device 110 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.11 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0104] like Fig.11As shown, the electronic device 110 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 111, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 112 or a program loaded from a storage device 118 to a random access memory (RAM) 113. In the RAM 113, various programs and data required for the operation of the electronic device 110 are also stored. The processing device 111, the ROM 112, and the RAM 113 are connected to each other via a bus 114. An input / output (I / O) interface 115 is also connected to the bus 114.

[0105] Typically, the following devices may be connected to the I / O interface 115: an input device 116 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 117 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 118 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 119. The communication device 119 may allow the electronic device 110 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.11 The electronic device 110 is shown with various devices, but it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have instead.

[0106] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 119, or installed from the storage device 118, or installed from the ROM 112. When the computer program is executed by the processing device 111, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0107] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0108] In some embodiments, the device side and the platform side may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0109] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0110] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: receives a shard query request sent by a first device to a first instance in an intelligent Internet of Things platform, wherein the shard query request carries device information of the first device; determines a first shard corresponding to the first device in at least one shard included in the first instance according to the device information of the first device and a mapping relationship between devices and shards stored in the first instance; and returns an access address of the first shard to the first device, so that the first device accesses the first shard in the intelligent Internet of Things platform based on the access address.

[0111] Alternatively, the computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: receives an access address of a first shard corresponding to a first device from the smart Internet of Things platform; and accesses the first shard in the smart Internet of Things platform based on the access address of the first shard when the access address of the first shard is within a validity period.

[0112] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0113] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0114] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, limit the module itself.

[0115] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0116] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0117] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0118] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0119] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A device access method for an intelligent Internet of Things platform, characterized in that: The device access method comprises: Receive a shard query request sent by a first device to a first instance in the smart Internet of Things platform, where the shard query request carries device information of the first device; Determine, according to the device information of the first device and the mapping relationship between devices and slices stored in the first instance, a first slice corresponding to the first device in at least one slice included in the first instance; The access address of the first shard is returned to the first device, so that the first device accesses the first shard in the smart Internet of Things platform based on the access address.

2. The device access method of the intelligent Internet of Things platform according to claim 1 is characterized in that: The smart Internet of Things platform includes at least one instance, each instance includes at least one shard, each shard includes resources required to access a corresponding preset number of devices, and the at least one shard included in the first instance is created in the following manner: In response to a shard configuration operation on the first instance, determining shard parameter information corresponding to the shard configuration operation, the shard parameter information at least including a target device quantity; The target resources required by the devices of the target number of devices are determined according to the shard parameter information, and a second shard of the first instance is created based on the target resources.

3. The device access method of the intelligent Internet of Things platform according to claim 1 is characterized in that: The device access method further includes: In response to a deletion operation on the third shard in the first instance, determining whether there are other shards in the first instance that can migrate devices in the third shard; In the case that the other shards exist in the first instance, the devices in the third shard are migrated to the other shards, the third shard and the mapping relationship corresponding to the third shard stored in the first instance are deleted, and the mapping relationship between the devices and shards stored in the first instance is updated based on the mapping relationship between the migrated devices and the other shards.

4. The device access method of the intelligent Internet of Things platform according to any one of claims 1 to 3, characterized in that: The mapping relationship between the device and the slice stored in the first instance is determined in the following manner: receiving a device registration request for the first instance from at least one second device to be registered, each of the device registration requests carrying device information corresponding to the second device; For each of the second devices, determining a fourth shard corresponding to the second device from at least one shard included in the first instance based on a preset sharding strategy; A mapping relationship between the device and the slice is determined according to the device information of each second device and the slice information of its corresponding slice.

5. The device access method of the intelligent Internet of Things platform according to claim 4 is characterized in that: The determining, based on a preset sharding strategy, a fourth shard corresponding to the second device from at least one shard included in the first instance includes: Determine the slice with the largest number of remaining registrable devices in at least one slice included in the first instance as the fourth slice corresponding to the second device; or, A slice having the same belonging region as that of the second device among the at least one slice included in the first instance is determined as a fourth slice corresponding to the second device.

6. The device access method of the intelligent Internet of Things platform according to claim 4 is characterized in that: The device access method further includes: Forwarding the device registration request of the second device to the slice service component corresponding to the fourth slice through the slice management component of the first instance, so that the slice service component stores the device information of the second device in the slice database corresponding to the fourth slice, and the slice database corresponding to the fourth slice is used to store at least the access address of the fourth slice and the device information of the registered device of the fourth slice; The mapping relationship between the second device and the fourth shard is stored in an instance database corresponding to the first instance through the shard management component.

7. The device access method of the intelligent Internet of Things platform according to any one of claims 1 to 3, characterized in that: The returning the access address of the first slice to the first device includes: The access address of the first shard is queried in the shard database corresponding to the first shard, and the queried access address of the first shard is returned to the first device, wherein the shard database corresponding to the first shard is at least used to store the access address of the first shard.

8. The device access method of the intelligent Internet of Things platform according to any one of claims 1 to 3, characterized in that: The device information of the first device includes identification information of the first device, the shard query request also includes a timestamp and a first authentication token, the first authentication token is generated by the first device according to a first agreed policy based on the timestamp, the identification information of the first device, and key information, and the returning the access address of the first shard to the first device includes: Based on the identification information of the first device, query the shard database corresponding to the first shard to obtain the key information of the first device, where the shard database corresponding to the first shard stores the key information of the first device; generating a second authentication token according to the first agreed policy based on the timestamp, the identification information of the first device and the key information; When the first authentication token and the second authentication token are the same, the access address of the first shard is returned to the first device.

9. The device access method of the intelligent Internet of Things platform according to any one of claims 1 to 3, characterized in that: The returning the access address of the first slice to the first device includes: According to the device information of the first device, the access address of the first shard is obtained by parsing the stored encrypted mapping information according to the second agreed policy through a preset interface, and the access address of the first shard is returned to the first device; The encrypted mapping information is generated according to the second agreed policy based on the device information, the belonging region and the access address of the slice corresponding to each registered device, and the stored encrypted mapping information is updated periodically.

10. The device access method of the intelligent Internet of Things platform according to any one of claims 1 to 3, characterized in that: The returning the access address of the first slice to the first device includes: Returning the first address corresponding to the message proxy cluster node in the first shard to the first device; or, The second address corresponding to the layer-4 load balancing component in the first slice is returned to the first device.

11. The device access method of the intelligent Internet of Things platform according to claim 10, characterized in that: The device access method further includes: In the case where the first instance includes a backup shard of the first shard, the third address corresponding to the message proxy cluster node in the backup shard is returned to the first device, or the fourth address corresponding to the four-layer load balancing component in the backup shard is returned to the first device.

12. A device access method for an intelligent Internet of Things platform, characterized in that: The device access method comprises: Receive an access address of a first shard corresponding to a first device from the smart Internet of Things platform; When the access address of the first shard is within a validity period, access the first shard in the smart Internet of Things platform based on the access address of the first shard.

13. The device access method of the intelligent Internet of Things platform according to claim 12, characterized in that: The device access method further includes: When the access address of the first shard is not within the validity period, a new shard query request is sent to the first instance in the intelligent Internet of Things platform based on the device information of the first device, so that the intelligent Internet of Things platform responds to the new shard query request and returns the access address of the new shard corresponding to the first device, and the first device is a registered device of the first instance.

14. A device access device for an intelligent Internet of Things platform, characterized in that: The device access device comprises: A request receiving module, configured to receive a shard query request sent by a first device to a first instance in the smart Internet of Things platform, wherein the shard query request carries device information of the first device; a determination module, configured to determine, according to the device information of the first device and the mapping relationship between devices and slices stored in the first instance, a first slice corresponding to the first device in at least one slice included in the first instance; A returning module is used to return the access address of the first shard to the first device, so that the first device accesses the first shard in the smart Internet of Things platform based on the access address.

15. A device access device for an intelligent Internet of Things platform, characterized in that: The device access device comprises: An address receiving module, used to receive an access address of a first shard corresponding to a first device from a smart Internet of Things platform; An access module is used to access the first shard in the smart Internet of Things platform based on the access address of the first shard when the access address of the first shard is within a validity period.

16. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 13 are implemented.

17. An electronic device, characterized in that: include: a storage device having at least one computer program stored thereon; At least one processing device, configured to execute the at least one computer program in the storage device to implement the steps of the method according to any one of claims 1 to 13.

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