Account creation method, IoT multi-tenant system, equipment, program and media

By using multiple database instances to create accounts and dynamically adjust the connection pool in the IoT multi-tenant system, the service restart problem caused by static file storage is solved, the account creation efficiency is improved, the operation and maintenance costs are reduced, and the flexibility and security of the system are enhanced.

CN114969045BActive Publication Date: 2025-09-12BOE TECHNOLOGY GROUP CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210607840.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-31
Publication Date
2025-09-12
Estimated Expiration
2042-05-31

AI Technical Summary

Technical Problem

In IoT multi-tenant systems, static files storing multiple tenant database configuration data can cause service restarts, impacting account creation efficiency and increasing operation and maintenance costs.

Method used

Accounts are created by presetting multiple different types of database instances, avoiding static file storage of database configuration data. Event-driven message notifications are used to update other services in real time, connection pool configuration parameters are dynamically adjusted, and account keys and business keys are generated for identity authentication.

Benefits of technology

It improves account creation efficiency, reduces operation and maintenance costs, enhances system flexibility and security, and avoids resource waste and competition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114969045B_ABST
    Figure CN114969045B_ABST
Patent Text Reader

Abstract

The account creation method, Internet of Things multi-tenant system, device, program and medium provided by the present disclosure belong to the field of Internet of Things technology and are applied to the Internet of Things multi-tenant platform. The method includes: receiving an account creation request, the account creation request including at least: an account identifier and a database instance identifier; creating a target tenant database corresponding to the account identifier in a database server according to a database instance corresponding to the database instance identifier, wherein the database instance is a database instance corresponding to an existing tenant database in the database server; after the target tenant database is created, outputting a notification of successful account creation corresponding to the account identifier.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the field of Internet of Things technology, and in particular relates to an account creation method, an Internet of Things multi-tenant system, a device, a program, and a medium. Background Art

[0002] In recent years, with the rapid development of the Internet of Things, the maturity of Internet of Things software and hardware development technologies, and the growing demand of users for Internet of Things platforms, software as a service technology has gradually matured, and various Internet of Things services can be provided to multiple different tenants in house rental scenarios through the Internet of Things system.

[0003] However, since tenant-related information is usually stored in static files, adding configuration information to multiple tenant database configuration data will cause service restart issues. Summary of the Invention

[0004] The present disclosure provides an account creation method, an Internet of Things multi-tenant system, a device, a program, and a medium.

[0005] Some embodiments of the present disclosure provide an account creation method, which is applied to an Internet of Things multi-tenant platform. The method includes:

[0006] Receive an account creation request, the account creation request including at least: an account identifier and a database instance identifier;

[0007] Creating a target tenant database corresponding to the account identifier in a database server according to a database instance corresponding to the database instance identifier, wherein the database instance is a database instance corresponding to an existing tenant database in the database server;

[0008] After the target tenant database is created, a notification of successful account creation corresponding to the account identifier is output.

[0009] Optionally, the account creation request further includes: a service identifier associated with the account identifier;

[0010] Outputting a notification of successful account creation corresponding to the account identifier includes:

[0011] Sending a notification of successful account creation corresponding to the account identifier to the business service end corresponding to the business identifier;

[0012] After outputting a notification of successful account creation corresponding to the account identifier, the method further includes:

[0013] Receiving a data source identifier sent by the business server according to the account creation success notification;

[0014] A mapping relationship is established between a data source corresponding to the data source identifier and the account identifier, where the data source is used to provide business service data to the account.

[0015] Optionally, after establishing the mapping relationship between the data source corresponding to the data source identifier and the account identifier, the method further includes:

[0016] A connection pool is established between the target tenant database and the data source.

[0017] Optionally, after establishing the connection pool between the target tenant database and the data source, the method further includes:

[0018] Obtaining the connection pool operating parameters;

[0019] Adjusting connection pool configuration parameters based on the connection pool operating parameters;

[0020] Sending a connection pool adjustment notification carrying the connection pool configuration parameters to the business server;

[0021] The connection pool adjustment notification is used to instruct the business server to execute at least one of the following connection pool configuration parameter methods:

[0022] When the number of connections is greater than the maximum number of connections, releasing the connections exceeding the maximum number of connections;

[0023] When the number of idle connections is greater than the maximum number of idle connections, releasing the idle connections that exceed the maximum number of idle connections;

[0024] When the number of idle connections is less than the minimum number of idle connections, connections whose number is less than the minimum number of idle connections are created.

[0025] Optionally, after receiving the account creation request, the method further includes:

[0026] The account identifier and the database instance identifier are associated and stored in a main database, where the main database is used to store tenant information related to the account.

[0027] Optionally, after creating a target tenant database corresponding to the account identifier in a database server according to the database instance corresponding to the database instance identifier, the method further includes:

[0028] Creating a business table corresponding to the account ID in the target tenant database;

[0029] Initialize the business information and authority information in the business table;

[0030] The business table is used to record the user information corresponding to the account identifier and is used for querying the object described by the permission information.

[0031] Optionally, the method further includes:

[0032] receiving a service registration request sent by the account, wherein the service registration request includes at least: a service identifier and an account identifier;

[0033] Generate an account key and a business key corresponding to the account identifier;

[0034] The account key and the business key are sent to the business service end corresponding to the business identifier to complete the service registration process of the account. The account key and the business key are used to verify the identity of the account.

[0035] Some embodiments of the present disclosure provide an Internet of Things multi-tenant system, the system comprising: an Internet of Things device, a business service end, and a database server;

[0036] The IoT device is configured to send an account creation request to the database server in response to user input, wherein the account creation request includes: an account identifier, a database instance identifier, and a service identifier;

[0037] The database server is configured to create a target tenant database corresponding to the account identifier in the database server based on the database instance corresponding to the database instance identifier, wherein the database instance is a database instance corresponding to an existing tenant database in the database server; after the target tenant database is created, send a notification of successful database creation corresponding to the account identifier to the IoT device and the business server;

[0038] The business service end is configured to create a data source corresponding to the account identifier according to the database creation success notification, and send the data source identifier of the data source to the Internet of Things device;

[0039] The IoT device is configured to establish a mapping relationship between the data source corresponding to the data source identifier and the account identifier, so as to establish a connection pool between the target tenant database and the data source.

[0040] Optionally, the IoT device is further configured to obtain the connection pool operating parameters; adjust the connection pool configuration parameters based on the connection pool operating parameters; send a connection pool adjustment notification carrying the connection pool configuration parameters to the business server; and the business server executes at least one of the following connection pool configuration parameter methods according to the business server:

[0041] When the number of connections is greater than the maximum number of connections, releasing the connections exceeding the maximum number of connections;

[0042] When the number of idle connections is greater than the maximum number of idle connections, releasing the idle connections that exceed the maximum number of idle connections;

[0043] When the number of idle connections is less than the minimum number of idle connections, connections whose number is less than the minimum number of idle connections are created.

[0044] Optionally, the IoT device is further configured to generate an account key and a business key corresponding to the account identifier; and send the account key and the business key to a business service end corresponding to the business identifier to complete the service registration process of the account, wherein the account key and the business key are used to verify the identity of the account;

[0045] The business service end is further configured to store the account key and the business key in association with each other.

[0046] Optionally, the IoT device is further configured to generate a first account signature based on the account key and the business key in response to user input; and send a service acquisition request carrying the account key and the second account signature to the business server;

[0047] The business service end is further configured to query a business key associated with the account key, and generate a second account signature based on the business key and the account key; and send business service information to the IoT device when the first account signature and the second account signature are successfully compared.

[0048] Optionally, the IoT device is further configured to send an account verification request carrying the account identifier to the business server in response to the received device information query operation;

[0049] The business service end is further configured to query the account information corresponding to the account identifier from the database server in response to the account verification request; after the account information is verified, send an authentication success message of the account identifier to the Internet of Things device;

[0050] The Internet of Things device is further configured to obtain, in response to the authentication pass message, device information that matches the account authority of the account identifier from the database server; and display the device information.

[0051] Some embodiments of the present disclosure provide an account creation device, which is applied to an Internet of Things multi-tenant platform, and includes:

[0052] The tenant management module is configured to receive an account creation request, wherein the account creation request includes at least: an account identifier and a database instance identifier;

[0053] a data isolation module configured to create a target tenant database corresponding to the account identifier in a database server according to a database instance corresponding to the database instance identifier, wherein the database instance is a database instance corresponding to an existing tenant database in the database server;

[0054] The tenant management module is further configured to output a notification of successful account creation corresponding to the account identifier after the target tenant database is created.

[0055] Optionally, the account creation request further includes: a service identifier associated with the account identifier;

[0056] The data isolation module is further configured to:

[0057] Sending a notification of successful account creation corresponding to the account identifier to the business service end corresponding to the business identifier;

[0058] Receiving a data source identifier sent by the business server according to the account creation success notification;

[0059] A mapping relationship is established between a data source corresponding to the data source identifier and the account identifier, where the data source is used to provide business service data to the account.

[0060] Optionally, the data isolation module is further configured to:

[0061] A connection pool is established between the target tenant database and the data source.

[0062] Optionally, the device further includes: a monitoring operation and maintenance module configured to:

[0063] Obtaining the connection pool operating parameters;

[0064] Adjusting connection pool configuration parameters based on the connection pool operating parameters;

[0065] Sending a connection pool adjustment notification carrying the connection pool configuration parameters to the business server;

[0066] The connection pool adjustment notification is used to instruct the business server to execute at least one of the following connection pool configuration parameter methods:

[0067] When the number of connections is greater than the maximum number of connections, releasing the connections exceeding the maximum number of connections;

[0068] When the number of idle connections is greater than the maximum number of idle connections, releasing the idle connections that exceed the maximum number of idle connections;

[0069] When the number of idle connections is less than the minimum number of idle connections, connections whose number is less than the minimum number of idle connections are created.

[0070] Optionally, the tenant management module is further configured to:

[0071] The account identifier and the database instance identifier are associated and stored in a main database, where the main database is used to store tenant information related to the account.

[0072] Optionally, the data isolation module is further configured to:

[0073] Creating a business table corresponding to the account ID in the target tenant database;

[0074] Initialize the business information and authority information in the business table;

[0075] The business table is used to record the user information corresponding to the account identifier and is used for querying the object described by the permission information.

[0076] Optionally, the device further includes: an application management module configured to:

[0077] receiving a service registration request sent by the account, wherein the service registration request includes at least: a service identifier and an account identifier;

[0078] Generate an account key and a business key corresponding to the account identifier;

[0079] The account key and the business key are sent to the business service end corresponding to the business identifier to complete the service registration process of the account. The account key and the business key are used to verify the identity of the account.

[0080] Optionally, the device further comprises:

[0081] The authentication center module is configured to perform permission verification on tenant information, user information and application information in the Internet of Things multi-tenant platform.

[0082] Some embodiments of the present disclosure provide a computing processing device, including:

[0083] a memory having computer readable code stored therein;

[0084] One or more processors. When the computer-readable code is executed by the one or more processors, the computing processing device performs the account creation method as described above.

[0085] Some embodiments of the present disclosure provide a computer program including a computer-readable code. When the computer-readable code is executed on a computing processing device, the computer-readable code causes the computing processing device to execute the above-mentioned account creation method.

[0086] Some embodiments of the present disclosure provide a non-transitory computer-readable medium storing the above-described account creation method.

[0087] The present disclosure provides an account creation method, an IoT multi-tenant system, a device, a program, and a medium. By presetting a plurality of different types of database instances for use when a user creates an account, the user can create an account database. This avoids the problem of static files storing database configuration data and requiring device restarts when adding new configurations, thereby improving the efficiency of account creation and reducing operation and maintenance costs.

[0088] The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the specific implementation methods of the present disclosure are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0090] Figure 1 The following schematically illustrates a flow chart of an account creation method provided by some embodiments of the present disclosure;

[0091] Figure 2 Schematically illustrates one of the logic diagrams of another account creation method provided by some embodiments of the present disclosure;

[0092] Figure 3 Schematically illustrates one of the flow charts of another account creation method provided by some embodiments of the present disclosure;

[0093] Figure 4 The second logical diagram schematically illustrates another account creation method provided by some embodiments of the present disclosure;

[0094] Figure 5 The second flowchart of another account creation method provided by some embodiments of the present disclosure is schematically shown;

[0095] Figure 6The third flowchart schematically illustrates another account creation method provided by some embodiments of the present disclosure;

[0096] Figure 7 The third logical diagram schematically illustrates another account creation method provided by some embodiments of the present disclosure;

[0097] Figure 8 Schematically illustrates a fourth flow chart of another account creation method provided by some embodiments of the present disclosure;

[0098] Figure 9 Schematically illustrates a fifth flow chart of another account creation method provided by some embodiments of the present disclosure;

[0099] Figure 10 Schematically illustrates a logic diagram of a rights management method provided by some embodiments of the present disclosure;

[0100] Figure 11 Schematically illustrates a fourth logic diagram of another account creation method provided by some embodiments of the present disclosure;

[0101] Figure 12 The following schematically illustrates a flow chart of a device information query method provided by some embodiments of the present disclosure;

[0102] Figure 13 Schematically illustrates a logic diagram of a permission authentication method provided by some embodiments of the present disclosure;

[0103] Figure 14 The following schematically illustrates a structural diagram of an Internet of Things multi-tenant system provided by some embodiments of the present disclosure;

[0104] Figure 15 The following schematically illustrates an architecture diagram of an Internet of Things multi-tenant system provided by some embodiments of the present disclosure;

[0105] Figure 16 The following schematically shows a structural diagram of an account creation device provided by some embodiments of the present disclosure;

[0106] Figure 17 Schematically shows a block diagram of a computing processing device for executing the method according to some embodiments of the present disclosure;

[0107] Figure 18 The figure schematically shows a storage unit for holding or carrying program codes for implementing methods according to some embodiments of the present disclosure. DETAILED DESCRIPTION

[0108] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.

[0109] Figure 1 The following schematically illustrates a flow chart of an account creation method provided by the present disclosure, which is applied to an IoT multi-tenant platform. The method includes:

[0110] Step 101: Receive an account creation request, where the account creation request includes at least an account identifier and a database instance identifier.

[0111] It should be noted that the execution subject of the present disclosure is an IoT device, which can be a non-directly connected device without IP capabilities. It can be counted into the SDK (Software Development Kit) by integrating multi-tenant devices on the gateway. The tenant's terminal device can be connected to the gateway as a sub-device and quickly connected to the IoT platform through the gateway. The gateway completes the data forwarding between the terminal device and the platform. Of course, the IoT device can also be a hardware device with strong computing and storage capabilities and IP capabilities. The multi-tenant device access SDK is directly integrated on the device, and the IoT platform is quickly connected through transmission protocols such as HTTPS (HyperText Transfer Protocol over Secure Socket Layer), MQTTS (Message Queuing Telemetry Transport) or COAP (Constrained Application Protocol). Such devices are equipped with intelligent systems.

[0112] The database server is used to provide tenant data sources for IoT devices. By setting up data sources for terminal devices in the database, it is conducive to unified management of tenant user data, providing a basis for isolating and sharing user data according to permissions, and centralized data source management can also ensure the security of user data.

[0113] It should be noted that database instance types include, but are not limited to, dedicated database types and shared database types. Dedicated database types represent databases used exclusively by a single tenant, while shared database types represent databases shared by multiple tenants. The specific settings can be determined based on actual needs and are not limited here. An account ID is a unique identifier used to identify a user and can be composed of an account name and a user ID. The account name can be set by the user, such as their name or nickname, while the user ID is a unique identifier generated by the system for the tenant. This combination of account name and user ID allows users to identify the tenant by identifying the account name, and also allows the system to identify the user based on the user ID.

[0114] In an embodiment of the present disclosure, when creating a tenant's account, the system administrator can log in to the IoT multi-tenant platform through the terminal device used by the system administrator to access the IoT device. After logging in, the system administrator can query the tenant information by viewing the tenant management list. The list content may include account ID, database instance type, list creation time, modification time, and query and modification operation controls, etc.

[0115] Step 102: Create a target tenant database corresponding to the account identifier in a database server according to a database instance corresponding to the database instance identifier, wherein the database instance is a database instance corresponding to an existing tenant database in the database server.

[0116] It should be noted that a database instance is a database configuration parameter required to build a database. System administrators can query the database instance ID, database instance name, and other database instance information for the corresponding database instance by selecting the desired database instance identifier. It is worth noting that the database instances in this disclosure are derived from existing tenant databases that have been previously built in the database server, that is, the database instances corresponding to the existing tenant databases. Therefore, there is no need to re-enter the database instance into the database server and then restart the server to configure the database instance for the target tenant database to be built.

[0117] Furthermore, the database instance identifiers of different existing tenant databases can be stored on the IoT device for direct query and use by the system administrator, or they can exist on an external storage device connected to the IoT device. Optionally, the database instance table containing database instance related information such as database instance identifier and database instance description information can be stored in the main database of the database server, so that the system administrator can obtain, view and edit it from the main database when creating an account through the IoT device.

[0118] Reference Figure 2, system administrators can access the multi-tenant management platform through a browser and enter database instance editing requests to perform operations such as adding, deleting, modifying, and querying database instances. Specifically, system administrators can edit database instances by entering the database instance name, database instance service address, database instance port number, database instance associated account, and account password to be edited. After the IoT device verifies the database instance associated account and account password, it can edit the database instance based on the entered database instance name, database instance service address, and database instance port number. If the entered database instance name does not exist, a database instance can be created based on the database instance name, database instance service address, and database instance port number. If it exists, it can be edited directly.

[0119] In an embodiment of the present disclosure, the IoT device responds to the system administrator's operation of selecting a database instance identifier by sending a database creation request carrying the database instance identifier to the connected database server. The database server queries the database instance corresponding to the database instance identifier, and creates a target tenant database corresponding to the account identifier based on the queried database instance.

[0120] Step 103: After the target tenant database is created, a notification indicating that the account has been successfully created is output.

[0121] In an embodiment of the present disclosure, after the database server completes the creation of the target tenant database, it sends a notification of successful account creation corresponding to the account identifier to the IoT device. The IoT device displays the account creation notification to inform the system administrator that the target tenant database corresponding to the account identifier has been created. The tenant information and account information corresponding to the account identifier can be stored in the target tenant database for use.

[0122] The disclosed embodiment pre-sets multiple different types of database instances for use in creating a database for an account when a user creates an account, thereby avoiding the problem of restarting the device when adding a new configuration when storing database configuration data in a static file, improving the efficiency of account creation, and reducing operation and maintenance costs.

[0123] Optionally, the account creation request further includes: a service identifier associated with the account identifier, referring to Figure 3 , the step 103 includes:

[0124] Step 1031: Send a notification of successful account creation corresponding to the account identifier to the business service end corresponding to the business identifier.

[0125] In the disclosed embodiment, after creating a database for a tenant, the IoT multi-tenant platform notifies other services in real time through event-driven message notifications.

[0126] Step 1032: Receive the data source identifier sent by the business server according to the account creation success notification.

[0127] In the embodiment of the present disclosure, after monitoring the tenant's account creation notification, the business server automatically creates an independent data source locally for the tenant corresponding to the account and sends the data source identifier to the IoT device.

[0128] Step 1033: Establish a mapping relationship between the data source corresponding to the data source identifier and the account identifier, where the data source is used to provide business service data to the account.

[0129] In the embodiment of the present disclosure, the IoT device adapts to the data source identifier provided by the business server and associates and stores the data source corresponding to the data source identifier with the account identifier.

[0130] Step 1034: Establish a connection pool between the target tenant database and the data source.

[0131] In the disclosed embodiment, the IoT device interacts with the database server to establish a connection pool between the target tenant database corresponding to the account identifier and the data source of the business service end.

[0132] Step 1035: Obtain the connection pool operation parameters.

[0133] Step 1036: Adjust the connection pool configuration parameters based on the connection pool operation parameters.

[0134] Step 1037: Send a connection pool adjustment notification carrying the connection pool configuration parameters to the business server.

[0135] In the disclosed embodiments, after establishing an independent connection pool corresponding to an account identifier, the IoT device can monitor the connection pool's usage in real time through the gateway to obtain connection pool operating parameters, thereby adjusting the connection pool's configuration parameters based on a pre-set dynamic connection pool adjustment policy. Specifically, after calculating the connection pool configuration parameters to be adjusted using the dynamic connection pool adjustment policy, the IoT device can interact with the service server to adjust the connection pool's configuration parameters, such as the number of connections, maximum number of connections, and minimum number of connections.

[0136] The disclosed embodiments are based on the Internet of Things technology scenario and adopt a microservice architecture as a whole. They support the coordinated dynamic creation of data sources by multiple services in a distributed deployment environment. After the tenant service creates the tenant database, it notifies other services in real time through event-driven message notifications. After receiving the notification, other services create data sources for the tenants. After the data source initialization is completed, data query services can be immediately provided to the tenants, thereby improving the flexibility of the multi-tenant Internet of Things system.

[0137] The connection pool adjustment notification is used to instruct the business server to execute at least one of the following connection pool configuration parameter methods:

[0138] When the number of connections is greater than the maximum number of connections, releasing the connections exceeding the maximum number of connections;

[0139] When the number of idle connections is greater than the maximum number of idle connections, releasing the idle connections that exceed the maximum number of idle connections;

[0140] When the number of idle connections is less than the minimum number of idle connections, connections whose number is less than the minimum number of idle connections are created.

[0141] Optionally, the connection pool adjustment notification is used to instruct the business server to execute at least one of the following connection pool configuration parameter methods:

[0142] Connection pool configuration parameter mode 1: when the number of connections is greater than the maximum number of connections, the number of connections exceeding the maximum number of connections is released;

[0143] Connection pool configuration parameter mode 2: when the number of idle connections is greater than the maximum number of idle connections, the idle connections exceeding the maximum number of idle connections are released;

[0144] Connection pool configuration parameter mode 3: when the number of idle connections is less than the minimum number of idle connections, create connections whose number is less than the minimum number of idle connections.

[0145] In the embodiment of the present disclosure, for method 1, the connection data can be adjusted based on the load of the gateway device, that is, when the load is too large, the number of connections in the connection pool can be appropriately reduced, and conversely, when the load is small, the number of connections in the connection pool can be increased, wherein the maximum number of connections is calculated as maximum number of connections = QPS / number of business service instance nodes * 80%. For method 2, even when there is no database connection, the number of idle connections can still be maintained without being cleared, and they are on standby at any time. Usually 20% of the maximum number of connections is taken. For method 3, when the number of connections is less than this value, the connection pool will create connections to supplement the number of this value, usually 5% of the maximum number of connections.

[0146] The disclosed embodiment supports real-time dynamic adjustment of database connection pool parameters by multiple service terminals in a multi-tenant mode of a distributed environment Internet of Things platform (at the gateway layer, the RPS (Request Per Second, the number of requests that can be processed per second, equivalent to QPS) and average response time of each tenant are calculated based on the identified tenants, and the tenant connection pool parameters (mainly including the maximum number of connections, the maximum number of idle connections, and the minimum number of idle connections) are dynamically adjusted. The gateway notifies other services of the calculated database connection pool parameters through messages, and other services adjust the connection pool parameters in real time according to the received parameters, thereby avoiding resource waste caused by excessive connection allocation and resource queuing and competition caused by insufficient connection allocation).

[0147] Optionally, after step 101, the method further includes: associating the account identifier and the database instance identifier and storing them in a master database, where the master database is used to store tenant information related to the account.

[0148] In the disclosed embodiments, the master database is a database within the database server used to store tenant information. This tenant information may include the tenant's account information, permission information, and tenant database configuration information. Therefore, when creating a new account, the received account identifier and the database instance identifier used by the constructed tenant database must be stored in the master database for subsequent query and editing by the system administrator, facilitating unified editing of multiple tenants within the IoT multi-tenant platform. Furthermore, the database instance identifier of the created tenant database can also be used for subsequent account creation, avoiding the issue of static file storage of database configuration data requiring device restarts when adding new configurations. This improves account creation efficiency and reduces operation and maintenance costs.

[0149] Optionally, you can Figure 4 The process shown is used to manage tenant information;

[0150] After the system administrator logs in to the authentication center through a user account, he can add, delete, modify and query tenant information through page operation instructions, and edit the tenant information stored in the main database of the database server and the business information stored in the tenant database through database operation instructions.

[0151] Optionally, refer to Figure 5 After step 103, the method further includes:

[0152] Step 104: Create a business table corresponding to the account identifier in the target tenant database.

[0153] Step 105 : Initialize the business information and authority information in the business table, wherein the business table is used to record the user information corresponding to the account identifier and to be queried by the object described by the authority information.

[0154] In the disclosed embodiments, a business table is used to store business information related to the tenant's service usage and the tenant's permission information, corresponding to the account identifier. After the target tenant database corresponding to the account identifier is created, the IoT device can instruct the database server to create a corresponding business table for the tenant in the target tenant database and initialize the business information and permission information therein. This allows subsequent users to store the service information and subsequently set permission information in the business table after using the business service. Furthermore, the contents of the business table are only viewable by tenants with query permissions, thereby ensuring data isolation between tenants and ensuring information security.

[0155] The disclosed embodiment uses ORM (object relational mapping) to dynamically create business tables for tenants after the tenant database is completed, avoiding the large amount of development work and error risks caused by manually parsing database metadata and manually generating table creation SQL (Structured Query Language) scripts.

[0156] Optionally, refer to Figure 6 , the method further comprises:

[0157] Step 301: Receive a service registration request sent by the account, where the service registration request at least includes: a service identifier and an account identifier.

[0158] Step 302: Generate an account key and a service key corresponding to the account identifier.

[0159] Step 303: Send the account key and the service key to the service service end corresponding to the service identifier to complete the service registration process of the account. The account key and the service key are used to verify the identity of the account.

[0160] In the embodiments of the present disclosure, the need for access by third-party business parties to the storage of the IoT multi-tenant system is taken into consideration. If the application provided by the third-party business party requires creating a separate account for the tenant and the tenant needs to perform multiple verifications on different accounts when using the services provided by the third-party business party, it will lead to unnecessary waste of resources and greatly affect the efficiency of the tenant in obtaining third-party business services. In addition, the account sharing between the third-party business party and the IoT multi-tenant system will also have a certain impact on the security of the system account.

[0161] Therefore, refer to Figure 7In the IoT multi-tenant system of the embodiment of the present disclosure, after a tenant's account is successfully created, if the tenant needs to use the business services of a third-party business party, the account key and business key corresponding to the business server are automatically generated for the account based on the business identifier and account identifier in the service registration request sent by the account for the business server to perform account verification.

[0162] Specifically, the IoT platform generates an account key (Access Key) (AK) and a business key (Secret Key) (SK) for each tenant. The Access Key (AK) is automatically generated, globally unique, and associated with the tenant ID (32-bit UUID + tenant domain), and cannot be modified. The Secret Key (SK) is also automatically generated, globally unique, and cannot be modified. The identity of the sender of a request is verified using an encrypted concatenation of the Access Key ID and the Secret Access Key. The Access Key ID (AK) identifies the user account, while the Secret Access Key (SK) is used by the user to encrypt the authentication string and by the cloud vendor to verify the authentication string. Each business server has a unique business key. This business key is provided to the business party for verification and must be kept confidential. Upon receiving the user's request, the business server uses the same SK corresponding to the AK and the same authentication mechanism to generate an authentication string. The authentication string is then compared with the authentication string included in the user request. If the authentication strings match, the system assumes that the user has the specified operation permissions and performs the corresponding operation. If the authentication strings differ, the system ignores the operation and returns an error code.

[0163] Optionally, refer to Figure 8 ,The verification process of the business server sending a request to the IoT device is as follows:

[0164] In step 401 , the IoT device generates a first account signature based on the account key and the business key in response to user input.

[0165] In step 402, the IoT device sends a service acquisition request carrying the account key and the second account signature to the business server.

[0166] In step 403 , the business server queries the business key associated with the account key, and generates a second account signature based on the business key and the account key.

[0167] In step 404, when the first account signature and the second account signature are successfully compared, the business service end sends business service information to the IoT device.

[0168] In the embodiment of the present disclosure, when an IoT device requests an IoT API (a functional interface for constructing service acquisition requests in an IoT multi-tenant platform), it first constructs a request header and then initiates a request; the appKey, timestamp, random number random, and signature are added to the request header; wherein the appKey is AK, the timestamp is the current time, the random number is a random number, and the signature is appKey+timestamp+random+SK generated using an algorithm; after the business server receives the request, it uses AK / SK for authentication; first, the appKey, timestamp, random, and signature parameters are obtained from the request header, and then the tenant is identified based on the sent appKey, and the database is searched to obtain the corresponding secret_key; IoT uses the same algorithm to calculate the signature of appKey+timestamp+random+SK together; the signature sent by the user is compared with the signature calculated by the business server, and if they are the same, the authentication is passed, otherwise it fails.

[0169] The present disclosure generates a business key and an account key for the account so that the external business server can verify the tenant's account, so that the tenant's account will not be directly exposed to the business server, and the business server can also verify the tenant's account, thereby ensuring the security of the tenant's account.

[0170] Optionally, refer to Figure 9 ,The process of IoT devices querying device information is as follows:

[0171] In step 501, the IoT device sends an account verification request carrying the account identifier to the business server in response to the received device information query operation.

[0172] Step 502: In response to the account verification request, the business service end queries the database server for account information corresponding to the account identifier.

[0173] In step 503, after successfully verifying the account information, the business service end sends a message indicating that the authentication of the account identifier is successful to the IoT device.

[0174] Step 504: In response to the authentication pass message, the IoT device obtains device information that matches the account authority of the account identifier from the database server.

[0175] Step 505: The IoT device displays the device information.

[0176] In the embodiments of the present disclosure, refer to Figure 10The IoT multi-tenant system mainly manages tenants through the user management module, role management module, authentication center module, and application management module. The user management module includes functions such as list query, tenant addition, deletion, modification, role assignment, and permission viewing. Role management includes functions such as role list query, addition, deletion, modification, role assignment, and user role viewing. The authentication center module provides functions such as permission list query, addition, modification, deletion, and role viewing. The application management module provides functions such as application list query, addition, deletion, modification, application permission assignment, and application permission viewing.

[0177] Optionally, refer to Figure 11 The authentication center is responsible for the security of the Internet of Things platform: it is mainly responsible for authenticating tenants, authenticating users and applications, authenticating user permissions and application permissions. The authentication center involves the interaction of multiple business service ends, and the business service ends pass tenant information with the help of context. The main functions include: tenant authentication: verifying the legitimacy of the tenant; user authentication: verifying the legitimacy of the user according to the tenant routing to the tenant data source; user authentication: verifying user permissions according to the tenant routing to the tenant data source; application authentication: verifying the legitimacy of the application according to the tenant routing to the tenant data source; application authentication: verifying the application permissions according to the tenant routing to the tenant data source.

[0178] Further, refer to Figure 12 , users can view device information through the following steps:

[0179] Step 1: The user requests the gateway by entering the login interface address in the browser;

[0180] Step 2: The gateway sends the login page to the browser;

[0181] Step 3: The user enters the account and password on the login page;

[0182] Step 4: The browser requests the gateway controller based on the user input;

[0183] Step 5: The gateway verifies the request parameters;

[0184] Step 6: The gateway requests the business server to identify the tenant based on the user account;

[0185] Step 7: The business server queries tenant information from the primary database server.

[0186] Step 8: The database server returns tenant information to the business server.

[0187] Step 9: The business server verifies whether the tenant information is legal;

[0188] Step 10: After the business server verifies the tenant information, it requests the database server to obtain the user information;

[0189] Step 11: The database server returns the user information to the business server.

[0190] Step 12: The business server verifies whether the user information is legal;

[0191] Step 13: The service server sends the authentication result to the gateway;

[0192] Step 14: The gateway requests the business server to obtain a list of permissions based on the user's viewing permissions;

[0193] Step 15: The business server queries the user's permissions from the database server.

[0194] Step 16: The database server sends the permission list to the business server.

[0195] Step 17: The business server returns the user permissions to the gateway;

[0196] Step 18: The gateway generates a user token (with user identification) based on the user's full password.

[0197] Step 19: The gateway instructs the browser to jump to the home page;

[0198] Step 20: The user selects the device information to be viewed in the browser;

[0199] Step 21: The browser sends a request containing the user token to the gateway.

[0200] Step 22: The gateway verifies whether the user token is valid.

[0201] Step 23: The gateway generates a tenant ID based on the user token.

[0202] Step 24: The gateway requests the service server to query device information based on the tenant ID;

[0203] Step 25: The service server requests the database server to query the device information in the device information table;

[0204] Step 26: The database server sends the retrieved device information to the business server.

[0205] Step 27: The service server sends the device information to the gateway.

[0206] In step 28, the gateway instructs the browser to jump to the device details page to display the device information.

[0207] Reference Figure 13,The main workflow for modifying tenant data is as follows:

[0208] S1. The client requests IoT services through the gateway, and the request is intercepted by the interceptor.

[0209] S2. The request interceptor will call the authentication and authorization service;

[0210] S3. The authentication service performs tenant identification and authentication by adding the tenant identifier to the request context.

[0211] S4, authentication and authorization service performs user authentication and user authorization;

[0212] S5. After successful authentication and authorization, the request interceptor forwards the request to the gateway API processor with the tenant context.

[0213] S6. The gateway API processor carries the tenant context to request the business server.

[0214] S7. The business server requests the business server based on the tenant context.

[0215] S8. The business server calls the functional interface of the multi-tenant data source switcher;

[0216] S9. The multi-tenant data source switcher queries or modifies tenant data.

[0217] Redis (Remote Dictionary Server) is an open-source, network-friendly, log-based, key-value database written in ANSI C, capable of both in-memory and persistent storage. It also provides APIs in multiple languages. PostgreSQL is a free, feature-rich object-relational database management system. MQTT (Message Queuing Telemetry Transport) is an ISO standard (ISO / IECPRF 20922) for messaging based on a publish / subscribe paradigm. Operating on the TCP / IP protocol suite, it is a publish / subscribe messaging protocol designed for remote devices with low-performance hardware and poor network conditions.

[0218] Figure 14 The schematic diagram of the structure of an Internet of Things multi-tenant system provided by the present disclosure is shown schematically, and the system includes: an Internet of Things device 100, a business service terminal 200, and a database server 300;

[0219] The business service end 200 is a server used to provide logical calculations, service data support and other functions with the Internet of Things device 100. It can be understood that since the computing power and storage capacity that the Internet of Things device 100 can provide are limited, the data processing and data storage pressure of the Internet of Things device 100 can be reduced by externally connecting the business service end 200. Of course, the business service end 200 is connected through the Internet of Things device 100.

[0220] The IoT device 100 is configured to send an account creation request to the database server 300 in response to user input, wherein the account creation request includes: an account identifier, a database instance identifier, and a service identifier;

[0221] The database server 300 is configured to create a target tenant database corresponding to the account identifier in the database server 300 according to the database instance corresponding to the database instance identifier, wherein the database instance is a database instance corresponding to an existing tenant database in the database server 300; after the target tenant database is created, a notification of successful database creation corresponding to the account identifier is sent to the IoT device 100 and the business server 200;

[0222] The business service end 200 is configured to create a data source corresponding to the account identifier according to the database creation success notification, and send the data source identifier of the data source to the IoT device 100;

[0223] The IoT device 100 is configured to establish a mapping relationship between the data source corresponding to the data source identifier and the account identifier, so as to establish a connection pool between the target tenant database and the data source.

[0224] Optionally, the IoT device 100 is further configured to obtain the connection pool operating parameters; adjust the connection pool configuration parameters based on the connection pool operating parameters; send a connection pool adjustment notification carrying the connection pool configuration parameters to the business server 200; and the business server 200 executes at least one of the following connection pool configuration parameter methods according to the business server 200:

[0225] When the number of connections is greater than the maximum number of connections, releasing the connections exceeding the maximum number of connections;

[0226] When the number of idle connections is greater than the maximum number of idle connections, releasing the idle connections that exceed the maximum number of idle connections;

[0227] When the number of idle connections is less than the minimum number of idle connections, connections whose number is less than the minimum number of idle connections are created.

[0228] Optionally, the IoT device 100 is further configured to generate an account key and a business key corresponding to the account identifier; and send the account key and the business key to the business service end 200 corresponding to the business identifier to complete the service registration process of the account. The account key and the business key are used to verify the identity of the account.

[0229] The business service end 200 is further configured to store the account key and the business key in association with each other.

[0230] Optionally, the IoT device 100 is further configured to generate a first account signature based on the account key and the business key in response to user input; and send a service acquisition request carrying the account key and the second account signature to the business server 200;

[0231] The business service end 200 is further configured to query the business key associated with the account key, and generate a second account signature based on the business key and the account key; when the first account signature and the second account signature are successfully compared, send business service information to the IoT device 100.

[0232] Optionally, the IoT device 100 is further configured to send an account verification request carrying the account identifier to the business service end 200 in response to the received device information query operation;

[0233] The business service end 200 is further configured to query the account information corresponding to the account identifier from the database server 300 in response to the account verification request; after the account information is verified, send an authentication success message of the account identifier to the IoT device 100;

[0234] The IoT device 100 is further configured to obtain, in response to the authentication pass message, device information that matches the account authority of the account identifier from the database server 300; and display the device information.

[0235] Reference Figure 15 The functions of the functional modules in the IoT multi-tenant system in some embodiments of the present disclosure are as follows:

[0236] The operation management module is responsible for managing and maintaining database instances and creating tenant databases in database instances.

[0237] The tenant management module is used for tenant management and supports the creation and management of tenants in this platform.

[0238] The authentication center module is used to set roles, grant functional permissions to roles, and then assign roles to users. Users then have the permissions of the role. When permissions need to be modified, only the permissions of the role need to be modified.

[0239] The application management module is used to create and manage third-party applications and manage application permissions. Applications can only access authorized platform APIs (Application Programming Interfaces).

[0240] The data isolation module is used to ensure that users can only see the tenant's own data, and the data between tenants is invisible.

[0241] The authentication center module includes: a tenant identification module, which is used to identify which tenant the user belongs to; an authentication module, which is used to verify the legitimacy of the tenant; user authentication, which is used to verify the legitimacy of the user; user authentication, which is used to verify user permissions; application authentication, which is used to verify the legitimacy of the application; and application authentication, which is used to verify application permissions.

[0242] Figure 16 The following schematically illustrates a structural diagram of an account creation device 60 provided by the present disclosure, which is applied to IoT devices in an IoT multi-tenant platform, including:

[0243] The tenant management module 601 is configured to receive an account creation request, wherein the account creation request includes at least: an account identifier and a database instance identifier;

[0244] A data isolation module 602 is configured to create a target tenant database corresponding to the account identifier in a database server according to a database instance corresponding to the database instance identifier, wherein the database instance is a database instance corresponding to an existing tenant database in the database server;

[0245] The tenant management module 601 is further configured to output a notification of successful account creation corresponding to the account identifier after the target tenant database is created.

[0246] Optionally, the account creation request further includes: a service identifier associated with the account identifier;

[0247] The data isolation module 602 is further configured to:

[0248] Sending a notification of successful account creation corresponding to the account identifier to the business service end corresponding to the business identifier;

[0249] Receiving a data source identifier sent by the business server according to the account creation success notification;

[0250] A mapping relationship is established between a data source corresponding to the data source identifier and the account identifier, where the data source is used to provide business service data to the account.

[0251] Optionally, the data isolation module 602 is further configured to:

[0252] A connection pool is established between the target tenant database and the data source.

[0253] Optionally, the apparatus further includes a monitoring and operation module 603 configured to:

[0254] Obtaining the connection pool operating parameters;

[0255] Adjusting connection pool configuration parameters based on the connection pool operating parameters;

[0256] Sending a connection pool adjustment notification carrying the connection pool configuration parameters to the business server;

[0257] The connection pool adjustment notification is used to instruct the business server to execute at least one of the following connection pool configuration parameter methods:

[0258] When the number of connections is greater than the maximum number of connections, releasing the connections exceeding the maximum number of connections;

[0259] When the number of idle connections is greater than the maximum number of idle connections, releasing the idle connections that exceed the maximum number of idle connections;

[0260] When the number of idle connections is less than the minimum number of idle connections, connections whose number is less than the minimum number of idle connections are created.

[0261] Optionally, the tenant management module 601 is further configured to:

[0262] The account identifier and the database instance identifier are associated and stored in a main database, where the main database is used to store tenant information related to the account.

[0263] Optionally, the data isolation module 602 is further configured to:

[0264] Creating a business table corresponding to the account ID in the target tenant database;

[0265] Initialize the business information and authority information in the business table;

[0266] The business table is used to record the user information corresponding to the account identifier and is used for querying the object described by the permission information.

[0267] Optionally, the apparatus further includes an application management module 604 configured to:

[0268] receiving a service registration request sent by the account, wherein the service registration request includes at least: a service identifier and an account identifier;

[0269] Generate an account key and a business key corresponding to the account identifier;

[0270] The account key and the business key are sent to the business service end corresponding to the business identifier to complete the service registration process of the account. The account key and the business key are used to verify the identity of the account.

[0271] Optionally, the device further comprises:

[0272] The authentication center module 605 is configured to perform permission verification on tenant information, user information and application information in the IoT multi-tenant platform.

[0273] The disclosed embodiment pre-sets multiple different types of database instances for use in creating a database for an account when a user creates an account, thereby avoiding the problem of restarting the device when adding a new configuration when storing database configuration data in a static file, improving the efficiency of account creation, and reducing operation and maintenance costs.

[0274] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0275] The various component embodiments of the present disclosure can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the computing processing equipment according to the embodiments of the present disclosure. The present disclosure can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing a part or all of the methods described herein. Such a program implementing the present disclosure can be stored on a non-transient computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0276] For example, Figure 17A computing processing device that can implement the method according to the present disclosure is shown. The computing processing device conventionally includes a processor 710 and a computer program product or non-transitory computer-readable medium in the form of a memory 720. The memory 720 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. The memory 720 has a storage space 730 for program code 731 for executing any method step in the above method. For example, the storage space 730 for program code can include individual program codes 731 for implementing various steps in the above method respectively. These program codes can be read from or written to one or more computer program products. These computer program products include program code carriers such as a hard disk, a compact disk (CD), a memory card or a floppy disk. Such a computer program product is typically as described in reference to Figure 18 The portable or fixed storage unit. The storage unit may have Figure 17 The memory 720 in the computing and processing device may be similarly arranged as a memory segment, storage space, or the like. The program code may be compressed, for example, in a suitable form. Typically, the storage unit includes computer-readable code 731′, i.e., code that can be read by a processor such as 710, which, when executed by the computing and processing device, causes the computing and processing device to perform the steps of the method described above.

[0277] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0278] References herein to "one embodiment," "an embodiment," or "one or more embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present disclosure. Furthermore, please note that instances of the phrase "in one embodiment" do not necessarily all refer to the same embodiment.

[0279] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present disclosure may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0280] In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present disclosure may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

[0281] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present disclosure.

Claims

1. A method for creating an account, characterized in that: Applied to an IoT multi-tenant platform, the method includes: Receive an account creation request, the account creation request including at least: an account identifier and a database instance identifier; Creating a target tenant database corresponding to the account identifier in a database server according to a database instance corresponding to the database instance identifier, wherein the database instance is a database instance corresponding to an existing tenant database in the database server; After the target tenant database is created, a notification of successful account creation corresponding to the account identifier is output; After creating a target tenant database corresponding to the account identifier in a database server according to the database instance corresponding to the database instance identifier, the method further includes: Creating a business table corresponding to the account ID in the target tenant database; Initialize the business information and authority information in the business table; The business table is used to record the user information corresponding to the account identifier and is used for querying the object described by the permission information.

2. The method according to claim 1, characterized in that The account creation request further includes: a service identifier associated with the account identifier; Outputting a notification of successful account creation corresponding to the account identifier includes: Sending a notification of successful account creation corresponding to the account identifier to the business service end corresponding to the business identifier; After outputting a notification of successful account creation corresponding to the account identifier, the method further includes: Receiving a data source identifier sent by the business server according to the account creation success notification; A mapping relationship is established between a data source corresponding to the data source identifier and the account identifier, where the data source is used to provide business service data to the account.

3. The method according to claim 2, characterized in that After establishing a mapping relationship between the data source corresponding to the data source identifier and the account identifier, the method further includes: establishing a connection pool between the target tenant database and the data source.

4. The method according to claim 3, characterized in that After establishing the connection pool between the target tenant database and the data source, the method further includes: Obtaining the connection pool operating parameters; Adjusting connection pool configuration parameters based on the connection pool operating parameters; Sending a connection pool adjustment notification carrying the connection pool configuration parameters to the business server; The connection pool adjustment notification is used to instruct the business server to execute at least one of the following connection pool configuration parameter methods: When the number of connections is greater than the maximum number of connections, releasing the connections exceeding the maximum number of connections; When the number of idle connections is greater than the maximum number of idle connections, releasing the idle connections that exceed the maximum number of idle connections; When the number of idle connections is less than the minimum number of idle connections, connections whose number is less than the minimum number of idle connections are created.

5. The method according to claim 1, wherein After receiving the account creation request, the method further includes: The account identifier and the database instance identifier are associated and stored in a main database, where the main database is used to store tenant information related to the account.

6. The method according to claim 1, characterized in that The method further comprises: receiving a service registration request sent by the account, wherein the service registration request includes at least: a service identifier and an account identifier; Generate an account key and a business key corresponding to the account identifier; The account key and the business key are sent to the business service end corresponding to the business identifier to complete the service registration process of the account. The account key and the business key are used to verify the identity of the account.

7. An Internet of Things multi-tenant system, characterized in that: The system includes: an Internet of Things device, a business service terminal, and a database server; The IoT device is configured to send an account creation request to the database server in response to user input, wherein the account creation request includes: an account identifier, a database instance identifier, and a service identifier; The database server is configured to create a target tenant database corresponding to the account identifier in the database server based on the database instance corresponding to the database instance identifier, wherein the database instance is a database instance corresponding to an existing tenant database in the database server; after the target tenant database is created, send a notification of successful database creation corresponding to the account identifier to the IoT device and the business server; The database server is configured to, after creating a target tenant database corresponding to the account identifier in the database server based on the database instance corresponding to the database instance identifier, further configured to create a business table corresponding to the account identifier in the target tenant database; initialize business information and permission information in the business table; wherein the business table is used to record user information corresponding to the account identifier and is queried by an object described by the permission information; The business service end is configured to create a data source corresponding to the account identifier according to the database creation success notification, and send the data source identifier of the data source to the Internet of Things device; The IoT device is configured to establish a mapping relationship between the data source corresponding to the data source identifier and the account identifier, so as to establish a connection pool between the target tenant database and the data source.

8. The system according to claim 7, characterized in that The IoT device is further configured to generate an account key and a business key corresponding to the account identifier; and send the account key and the business key to the business service end corresponding to the business identifier to complete the service registration process of the account. The account key and the business key are used to verify the identity of the account; The business service end is further configured to store the account key and the business key in association with each other.

9. The system according to claim 8, characterized in that The IoT device is further configured to generate a first account signature based on the account key and the service key in response to user input; and send a service acquisition request carrying the account key and the second account signature to the service server; The business service end is further configured to query a business key associated with the account key, and generate a second account signature based on the business key and the account key; and send business service information to the IoT device when the first account signature and the second account signature are successfully compared.

10. The system according to claim 7, wherein: The IoT device is further configured to send an account verification request carrying the account identifier to the business server in response to the received device information query operation; The business service end is further configured to query the account information corresponding to the account identifier from the database server in response to the account verification request; after the account information is verified, send an authentication success message of the account identifier to the Internet of Things device; The Internet of Things device is further configured to obtain, in response to the authentication pass message, device information that matches the account authority of the account identifier from the database server; and display the device information.

11. A computing and processing device, characterized in that: include: a memory having computer readable code stored therein; One or more processors, when the computer-readable code is executed by the one or more processors, the computing processing device performs the account creation method according to any one of claims 1 to 6.

12. A computer program, characterized in that The method comprises a computer-readable code, which, when executed on a computing and processing device, causes the computing and processing device to execute the account creation method according to any one of claims 1 to 6.

13. A non-transitory computer-readable medium, characterized in that A computer program for the account creation method according to any one of claims 1 to 6 is stored therein.

Citation Information

Patent Citations

  • System, device and method for isolating multi-tenant data

    CN107203575A

  • Multi-tenant SaaS platform rapid building and dynamic expansion method and system

    CN112100262A

  • Connection method, device and system of multivariate dynamic connection pool

    CN112732441A

  • Database service method and system

    CN113515499A