Multi-tenant data source processing method and apparatus, electronic device, and storage medium

By receiving tenants' business request information and routing enterprise business services, the problem of mutual interference between services in a multi-tenant environment is solved, enabling independent use of resources and dynamic scaling up and down, thereby improving the utilization rate of server resources.

CN117708786BActive Publication Date: 2026-08-04CHERY AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHERY AUTOMOBILE CO LTD
Filing Date
2023-12-25
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

In a multi-tenant environment, existing technologies can easily cause services from different tenants to interfere with each other, leading to a waste of server resources due to blind expansion.

Method used

By receiving business request information from tenants, obtaining service routing information and routing the corresponding enterprise business services, executing business request instructions, and initializing the enterprise library in the public library, the isolation between business data and system services is achieved, and dynamic scaling is supported.

Benefits of technology

This allows for the independent use of each service resource, avoiding mutual interference and improving the utilization and stability of server resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117708786B_ABST
    Figure CN117708786B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data processing, in particular to a multi-tenant data source processing method and device, electronic equipment and a storage medium, wherein the method comprises the following steps: receiving business request information of a current tenant, wherein the business request information comprises a business request instruction and an identity token; obtaining service routing information of the current tenant from a preset public library, routing enterprise business services corresponding to the current tenant based on the service routing information; executing the business request instruction through the enterprise business services, obtaining an execution result, and sending the execution result to the current tenant. Therefore, the problem that services between different tenants are easily influenced each other and blind expansion causes waste of server resources in the related art is solved, the business data and system services are isolated, the resources used by each service are independent and do not influence each other, the dynamic expansion and contraction are supported while ensuring that the services can stably operate, and the utilization rate of server resources is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a multi-tenant data source processing method, apparatus, electronic device and storage medium. Background Technology

[0002] The solutions to multi-tenancy problems in related technologies can be roughly divided into the following types: The first type is to isolate business data through database fields, and to associate all business data in the table through the tenant field. When operating on the data of different tenants, the association is based on the tenant ID. The second type is to physically isolate business data, store the business data of each tenant in different databases, share a common service, and achieve different tenants accessing different business data through switching between multiple data sources.

[0003] However, the relevant technologies have the following shortcomings: First, the business table data needs to store redundant tenant ID fields. If a tenant has a lot of business data, querying will be very troublesome. Moreover, since the services are shared, they will affect each other. In this case, to ensure normal service, it is necessary to expand the capacity. Such blind expansion will waste server resources. Second, although the data is physically isolated, the services are still shared. If a tenant has a high number of business requests or high concurrency, the services of different tenants will affect each other. In this case, to ensure normal service, it is necessary to expand the capacity. Such blind expansion will waste server resources, and it is unfair to enterprises with low request volume or concurrency. Summary of the Invention

[0004] This application provides a multi-tenant data source processing method, apparatus, electronic device, and storage medium to solve the problems in related technologies where services between different tenants can easily interfere with each other, and blind expansion can lead to a waste of server resources. It isolates business data and system services, so that the resources used by each service are independent and do not affect each other. While ensuring the stable operation of services, it supports dynamic expansion and contraction, thereby improving the utilization rate of server resources.

[0005] The first aspect of this application provides a multi-tenant data source processing method, including the following steps: receiving business request information of the current tenant, the business request information including: a business request instruction and an identity token; obtaining service routing information of the current tenant from a preset public library, routing the enterprise business service corresponding to the current tenant based on the service routing information; and executing the business request instruction through the enterprise business service, obtaining the execution result, and sending the execution result to the current tenant.

[0006] Optionally, in some embodiments, before receiving the business request information from the current tenant, the process includes: receiving the login information of the current tenant; obtaining service routing information from the public library; routing the enterprise tenant service according to the service routing information; verifying the login information through the enterprise tenant service; and returning the identity token of the current tenant after successful verification.

[0007] Optionally, in some embodiments, before receiving the login information of the current tenant, the method further includes: receiving the registration information of the current tenant; adding the tenant information of the current tenant, the connection parameters between the public database and the enterprise database, and the service routing information of the enterprise database to the public database based on the registration information; connecting to the enterprise database based on the connection parameters between the public database and the enterprise database, and initializing the enterprise database; and returning a reminder message indicating successful tenant registration after the enterprise database has been initialized.

[0008] Optionally, in some embodiments, before executing the business request instruction through the enterprise business service, the method further includes: the enterprise business service performing authentication based on the current tenant's business request information, and executing the business request instruction through the enterprise business service after successful authentication.

[0009] Optionally, in some embodiments, initializing the enterprise database further includes: downloading an initialization table structure from a template library and initializing the table structure of the enterprise database based on the registration information.

[0010] A second aspect of this application provides a multi-tenant data source processing apparatus, comprising: a receiving module for receiving business request information of a current tenant, wherein the business request information includes: a business request instruction and an identity token; an obtaining module for obtaining service routing information of the current tenant from a preset public database, and routing enterprise business services corresponding to the current tenant based on the service routing information; and an execution module for executing the business request instruction through the enterprise business service, obtaining an execution result, and sending the execution result to the current tenant.

[0011] Optionally, in some embodiments, before receiving the business request information of the current tenant, the receiving module includes: a receiving unit for receiving the login information of the current tenant; and a verification unit for obtaining service routing information from the public library, routing enterprise tenant services according to the service routing information, verifying the login information through the enterprise tenant services, and returning the identity token of the current tenant after successful verification.

[0012] Optionally, in some embodiments, before receiving the login information of the current tenant, the receiving unit further includes: a receiving subunit, used to receive the registration information of the current tenant; a adding subunit, used to add the tenant information of the current tenant, the connection parameters between the public database and the enterprise database, and the service routing information of the enterprise database to the public database according to the registration information; and an initialization subunit, used to connect to the enterprise database according to the connection parameters between the public database and the enterprise database, initialize the enterprise database, and return a reminder message that the tenant registration was successful after the enterprise database is initialized.

[0013] Optionally, in some embodiments, before executing the business request instruction through the enterprise business service, the execution module further includes:

[0014] The authentication unit is used to authenticate the current tenant's business request information through the enterprise business service, and execute the business request instruction through the enterprise business service after the authentication is successful.

[0015] Optionally, in some embodiments, the initialization subunit further includes: an initialization component for downloading an initialization table structure from a template library and initializing the table structure of the enterprise library based on the registration information.

[0016] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the multi-tenant data source processing method as described in the above embodiments.

[0017] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the multi-tenant data source processing method as described in the above embodiments.

[0018] Therefore, by receiving the current tenant's business request information, which includes a business request instruction and an identity token, and retrieving the current tenant's service routing information from a pre-defined public database, the system routes the corresponding enterprise business service to the current tenant based on this information. The business request instruction is then executed through the enterprise business service, and the execution result is sent back to the current tenant. This addresses the problems in related technologies where services between different tenants can easily interfere with each other, and blind expansion can lead to wasted server resources. By isolating business data and system services, each service uses independent resources without affecting others. This ensures stable service operation while supporting dynamic scaling, improving server resource utilization.

[0019] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0020] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0021] Figure 1 This is a flowchart of a multi-tenant data source processing method provided according to an embodiment of this application;

[0022] Figure 2 This is a schematic diagram of a tenant service processing flow according to an embodiment of this application;

[0023] Figure 3 This is a schematic diagram of a user login authentication process according to an embodiment of this application;

[0024] Figure 4 This is a schematic diagram of a tenant login authentication process according to an embodiment of this application;

[0025] Figure 5 This is a schematic diagram illustrating a public library, an enterprise library, and a template library provided according to an embodiment of this application;

[0026] Figure 6 This is a schematic diagram of a tenant registration process according to an embodiment of this application;

[0027] Figure 7 This is a block diagram of a multi-tenant data source processing apparatus provided according to an embodiment of this application;

[0028] Figure 8 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application. Detailed Implementation

[0029] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0030] The following description, with reference to the accompanying drawings, describes a multi-tenant data source processing method, apparatus, electronic device, and storage medium according to embodiments of this application. Addressing the problems mentioned in the background art where services between different tenants can easily interfere with each other, and blind expansion can lead to wasted server resources, this application provides a multi-tenant data source processing method. In this method, business request information from the current tenant is received, including a business request instruction and an identity token. Service routing information for the current tenant is obtained from a preset public library. Based on the service routing information, the corresponding enterprise business service for the current tenant is routed, and the business request instruction is executed through the enterprise business service. The execution result is then obtained and sent to the current tenant. This solves the problem in the related art where services between different tenants can easily interfere with each other, and blind expansion can lead to wasted server resources. By isolating business data and system services, the resources used by each service are independent and do not affect each other. While ensuring stable service operation, dynamic scaling up and down is supported, improving the utilization rate of server resources.

[0031] Specifically, Figure 1 This is a flowchart illustrating a multi-tenant data source processing method provided in an embodiment of this application.

[0032] like Figure 1 As shown, this multi-tenant data source processing method includes the following steps:

[0033] In step S101, the current tenant's business request information is received. The business request information includes: a business request instruction and an identity token.

[0034] The business request instruction can include the current business needs of the current tenant, and the identity token can be used for authentication.

[0035] Specifically, in combination Figure 2 As shown, when a tenant has business needs, it will issue a business request instruction. In this embodiment of the application, the tenant will perform corresponding work based on the business request instruction issued by the user and the identity token obtained.

[0036] Optionally, in some embodiments, before receiving the current tenant's business request information, the process includes: receiving the current tenant's login information; obtaining service routing information from a public library; routing the enterprise tenant service according to the service routing information; verifying the login information through the enterprise tenant service; and returning the current tenant's identity token after successful verification.

[0037] Understandably, to prevent services from interfering with each other, a tenant's login information can be obtained before they access business services. This login information can then be verified, and upon successful verification, the current tenant's identity token can be returned.

[0038] Specifically, in combination Figure 3 As shown in the diagram, when a user from Enterprise A logs in, they request the authentication service through the gateway. The authentication service calls the configuration service to obtain the connection parameters and service routing information from the enterprise database. The gateway routes the user to Enterprise A's user service based on the returned enterprise service routing information. Enterprise A's user service verifies the user's login information. After successful verification, Enterprise A's user service returns an authentication success message. The authentication service returns a successful authentication token, which the user can then use for authentication when accessing business services.

[0039] Combination Figure 4 As shown, after a tenant initiates login, it requests the authentication service through the gateway; the authentication service calls the user service, which reads the tenant information stored in the public database for verification; after the user service verifies the information, it returns success; the authentication service returns a successful authentication token, thus completing the login authentication for the tenant.

[0040] Optionally, in some embodiments, before receiving the current tenant's login information, the method further includes: receiving the current tenant's registration information; adding the current tenant's tenant information, connection parameters between the public database and the enterprise database, and service routing information of the enterprise database to the public database based on the registration information; connecting to the enterprise database based on the connection parameters between the public database and the enterprise database, and initializing the enterprise database; and returning a notification message indicating successful tenant registration after the enterprise database has been initialized.

[0041] Furthermore, in some embodiments, initializing the enterprise library further includes: downloading an initialization table structure from a template library and initializing the table structure of the enterprise library based on the registration information.

[0042] It should be noted that, in combination Figure 5 As shown in the embodiments of this application, three types of databases are predefined: an enterprise database, a template database, and a public database. The enterprise database contains the business data of each tenant, and the table structure and initialization data of the database are generated by the template database. The generation operation can use the Maven plugin to read the SQL script of the template database. The template database is used to store the initialization table structure and initialization data used by each tenant. The public database is used to store the database connection information of each tenant, the account information of the tenant administrator, the service routing information of different tenants, and the configuration information shared by different tenants.

[0043] Specifically, in this embodiment of the application, registration is required before a tenant can obtain business services. Specifically, after receiving the current tenant's registration information, the system can add the current tenant's tenant information, connection parameters between the public and enterprise databases, and service routing information of the enterprise database to the public database based on the registration information. The system then connects to the enterprise database according to the connection parameters and initializes the enterprise database. After the enterprise database completes initialization, a notification message indicating successful tenant registration is returned.

[0044] In actual implementation, combined with Figure 6 As shown, the tenant registration process can be as follows: Based on the user's registration information, add tenant information, tenant-specific database connection parameters, tenant-specific service routing parameters, etc., to the public database; and connect to the enterprise database through the tenant-specific database connection parameters, execute all DDL and DML statements in the template library directory of the project, and complete the initialization of the table structure of the enterprise database; after the data initialization is completed, return a successful tenant registration.

[0045] In step S102, the service routing information of the current tenant is obtained from the preset public library, and the enterprise business service corresponding to the current tenant is routed based on the service routing information.

[0046] Specifically, in combination Figure 2 As shown, in this application, enterprise user A, carrying the token obtained after successful authentication, requests the business interface through the gateway; the gateway routes to the authentication service, the authentication service calls the configuration service to obtain the service routing information of enterprise user A's service; and the gateway routes to the business service corresponding to enterprise user A.

[0047] In step S103, the business request instruction is executed through the enterprise business service, the execution result is obtained, and the execution result is sent to the current tenant.

[0048] Specifically, in this embodiment of the application, the service routing information of the current tenant is obtained from the public library, and the enterprise business service corresponding to the current tenant is routed based on the service routing information. After the business code of the corresponding enterprise business service is completed, the processing result is returned. For example, after the enterprise business service is completed, the message "Successfully processed" is returned, or after the enterprise business service fails to process, the message "Processing error, please retry" is returned.

[0049] Optionally, in some embodiments, before executing the business request instruction through the enterprise business service, the method further includes: the enterprise business service performing authentication based on the current tenant's business request information, and executing the business request instruction through the enterprise business service after successful authentication.

[0050] Specifically, in combination Figure 2As shown, in order to protect the security of enterprise business services, this application embodiment can perform authentication based on the current tenant's business request information before executing the business request instruction through the enterprise business service. The enterprise business service determines whether the current tenant has the corresponding business processing permission according to the business request instruction. If the current tenant has the corresponding business processing permission, the verification passes; if the current tenant does not have the corresponding business permission, the verification fails, and the system returns a message such as "verification failed".

[0051] In summary, this embodiment of the application can pre-establish three types of databases: an enterprise database for storing data from each tenant; a template database for providing initial table structures and initial data for each tenant; and a public database for storing database connection information for each tenant, tenant administrator account information, service routing information for different tenants, and configuration information shared by different tenants. Users can pre-register. After successful registration, tenant database connection information and service routing information are automatically generated based on the registered user's account, and the data is then saved to the public database. After successful data saving, a shell script is executed to perform operations such as database creation and initializing the enterprise database based on the template database. This embodiment of the application can also route services through the Spring Cloud Gateway service. The routing information data source comes from a separately deployed config service. When the config service starts, it loads the service routing data from the public database and then saves the routing data to a Redis cache.

[0052] According to the multi-tenant data source processing method proposed in this application, the method receives business request information from the current tenant, including a business request instruction and an identity token. It then retrieves the current tenant's service routing information from a pre-defined public database, routes the corresponding enterprise business service based on the service routing information, executes the business request instruction through the enterprise business service, obtains the execution result, and sends the execution result back to the current tenant. This solves the problems in related technologies where services between different tenants easily interfere with each other, and blind expansion leads to wasted server resources. By isolating business data and system services, the method ensures that each service uses independent resources without affecting others. While guaranteeing stable service operation, it supports dynamic scaling up and down, improving the utilization rate of server resources.

[0053] Next, the multi-tenant data source processing apparatus according to embodiments of this application is described with reference to the accompanying drawings.

[0054] Figure 7 This is a block diagram of a multi-tenant data source processing device according to an embodiment of this application.

[0055] like Figure 7As shown, the multi-tenant data source processing device 10 includes: a receiving module 100, an acquisition module 200, and an execution module 300.

[0056] The receiving module 100 is used to receive the business request information of the current tenant, wherein the business request information includes: business request instruction and identity token.

[0057] The acquisition module 200 is used to obtain the service routing information of the current tenant from a preset public library, and to route the enterprise business services corresponding to the current tenant based on the service routing information.

[0058] The execution module 300 is used to execute business request instructions through enterprise business services, obtain execution results, and send the execution results to the current tenant.

[0059] Optionally, in some embodiments, before receiving the current tenant's business request information, the receiving module includes a receiving unit and a verification unit.

[0060] The receiving unit is used to receive the login information of the current tenant.

[0061] The verification unit is used to obtain service routing information from the public library, route enterprise tenant services according to the service routing information, verify login information through enterprise tenant services, and return the identity token of the current tenant after successful verification.

[0062] Optionally, in some embodiments, before receiving the current tenant's login information, the receiving unit further includes: a receiving subunit, an adding subunit, and an initialization subunit.

[0063] The receiving subunit is used to receive the registration information of the current tenant.

[0064] The new sub-unit is used to add tenant information of the current tenant, connection parameters between the public database and the enterprise database, and service routing information of the enterprise database to the public database based on the registration information.

[0065] The initialization sub-unit is used to connect to the enterprise library according to the connection parameters between the public library and the enterprise library, and initialize the enterprise library. After the enterprise library completes initialization, it returns a reminder message that the tenant has successfully registered.

[0066] Optionally, in some embodiments, before executing the business request instruction through the enterprise business service, the execution module further includes an authentication unit.

[0067] The authentication unit is used to authenticate the business request information of the current tenant through the enterprise business service, and execute the business request instruction through the enterprise business service after the authentication is successful.

[0068] Optionally, in some embodiments, initializing the subunit further includes: initializing the subcomponent.

[0069] The initialization sub-component is used to download the initialization table structure from the template library and initialize the table structure of the enterprise library based on the registration information.

[0070] It should be noted that the foregoing explanation of the multi-tenant data source processing method embodiment also applies to the multi-tenant data source processing device of this embodiment, and will not be repeated here.

[0071] The multi-tenant data source processing apparatus proposed in this application receives business request information from the current tenant, including a business request instruction and an identity token. It then retrieves the current tenant's service routing information from a preset public database, routes the corresponding enterprise business service based on the service routing information, executes the business request instruction through the enterprise business service, obtains the execution result, and sends the execution result back to the current tenant. This solves the problem in related technologies where services between different tenants easily interfere with each other, and blind expansion leads to wasted server resources. By isolating business data and system services, each service uses independent resources without affecting others. While ensuring stable service operation, it supports dynamic scaling up and down, improving the utilization rate of server resources.

[0072] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include:

[0073] The memory 801, the processor 802, and the computer program stored on the memory 801 and capable of running on the processor 802.

[0074] When the processor 802 executes the program, it implements the multi-tenant data source processing method provided in the above embodiments.

[0075] Furthermore, electronic devices also include:

[0076] Communication interface 803 is used for communication between memory 801 and processor 802.

[0077] The memory 801 is used to store computer programs that can run on the processor 802.

[0078] The memory 801 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage.

[0079] If the memory 801, processor 802, and communication interface 803 are implemented independently, then the communication interface 803, memory 801, and processor 802 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0080] Optionally, in a specific implementation, if the memory 801, processor 802, and communication interface 803 are integrated on a single chip, then the memory 801, processor 802, and communication interface 803 can communicate with each other through an internal interface.

[0081] The processor 802 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of this application.

[0082] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the multi-tenant data source processing method described above.

[0083] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0084] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0085] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0086] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (FPGAs), field-programmable gate arrays (FPGAs), etc.

[0087] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0088] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A method for processing multi-tenant data sources, characterized in that, Includes the following steps: Receive the current tenant's business request information, which includes: a business request instruction and an identity token; Retrieve the service routing information of the current tenant from a preset public database, and based on the service routing information, route the enterprise business service corresponding to the current tenant; and The business request instruction is executed through the enterprise business service, and the execution result is obtained and sent to the current tenant; Before receiving the business request information from the current tenant, the process includes: receiving the login information of the current tenant; obtaining service routing information from the public library; routing the enterprise tenant service according to the service routing information; verifying the login information through the enterprise tenant service; and returning the identity token of the current tenant after successful verification. Before receiving the current tenant's login information, the method also includes: receiving the current tenant's registration information; Based on the registration information, add the current tenant's tenant information, the connection parameters between the public database and the enterprise database, and the service routing information of the enterprise database to the public database; connect to the enterprise database based on the connection parameters between the public database and the enterprise database, and initialize the enterprise database; after the enterprise database completes initialization, return a notification message indicating successful tenant registration.

2. The method according to claim 1, characterized in that, Before executing the business request instruction through the enterprise business service, the method further includes: The enterprise business service authenticates the current tenant's business request information, and executes the business request instruction through the enterprise business service after successful authentication.

3. The method according to claim 1, characterized in that, The initialization of the enterprise library also includes: Download the initial table structure from the template library and initialize the table structure of the enterprise library based on the registration information.

4. A multi-tenant data source processing device, characterized in that, include: The receiving module is used to receive the business request information of the current tenant, wherein the business request information includes: business request instructions and identity token; The acquisition module is used to obtain the service routing information of the current tenant from a preset public library, and based on the service routing information, route the enterprise business services corresponding to the current tenant; and An execution module is used to execute the business request instruction through the enterprise business service, obtain the execution result, and send the execution result to the current tenant; Before receiving the business request information from the current tenant, the receiving module includes: a receiving unit for receiving the login information of the current tenant; and a verification unit for obtaining service routing information from the public library, routing the enterprise tenant service according to the service routing information, verifying the login information through the enterprise tenant service, and returning the identity token of the current tenant after the verification is successful. Before receiving the login information of the current tenant, the receiving unit further includes: a receiving subunit for receiving the registration information of the current tenant; a adding subunit for adding the tenant information of the current tenant, the connection parameters between the public database and the enterprise database, and the service routing information of the enterprise database to the public database according to the registration information; and an initialization subunit for connecting to the enterprise database according to the connection parameters between the public database and the enterprise database, initializing the enterprise database, and returning a reminder message that the tenant registration was successful after the enterprise database has been initialized.

5. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the multi-tenant data source processing method as described in any one of claims 1-3.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the multi-tenant data source processing method as described in any one of claims 1-3.