CN111582773A - Multi-tenant technology-based micro-grid energy cloud model control method and system - Google Patents
Multi-tenant technology-based micro-grid energy cloud model control method and system Download PDFInfo
- Publication number
- CN111582773A CN111582773A CN202010572572.2A CN202010572572A CN111582773A CN 111582773 A CN111582773 A CN 111582773A CN 202010572572 A CN202010572572 A CN 202010572572A CN 111582773 A CN111582773 A CN 111582773A
- Authority
- CN
- China
- Prior art keywords
- tenant
- data
- database
- microgrid
- account
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 40
- 238000005516 engineering process Methods 0.000 title claims abstract description 26
- 238000002955 isolation Methods 0.000 claims abstract description 57
- 238000005259 measurement Methods 0.000 claims description 32
- 238000013507 mapping Methods 0.000 claims description 24
- 238000012216 screening Methods 0.000 claims description 14
- 230000008569 process Effects 0.000 claims description 8
- 238000001914 filtration Methods 0.000 claims description 7
- 238000004146 energy storage Methods 0.000 claims description 4
- 230000001360 synchronised effect Effects 0.000 claims 1
- 238000013500 data storage Methods 0.000 abstract description 9
- 238000011084 recovery Methods 0.000 abstract description 3
- 238000007726 management method Methods 0.000 description 22
- 238000004891 communication Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0631—Resource planning, allocation, distributing or scheduling for enterprises or organisations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/06—Energy or water supply
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J3/00—Circuit arrangements for ac mains or ac distribution networks
- H02J3/38—Arrangements for parallely feeding a single network by two or more generators, converters or transformers
- H02J3/381—Dispersed generators
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J2203/00—Indexing scheme relating to details of circuit arrangements for AC mains or AC distribution networks
- H02J2203/20—Simulating, e g planning, reliability check, modelling or computer assisted design [CAD]
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J2300/00—Systems for supplying or distributing electric power characterised by decentralized, dispersed, or local generation
- H02J2300/20—The dispersed energy generation being of renewable origin
- H02J2300/22—The renewable source being solar energy
- H02J2300/24—The renewable source being solar energy of photovoltaic origin
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J2300/00—Systems for supplying or distributing electric power characterised by decentralized, dispersed, or local generation
- H02J2300/20—The dispersed energy generation being of renewable origin
- H02J2300/28—The renewable source being wind energy
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02B—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
- Y02B10/00—Integration of renewable energy sources in buildings
- Y02B10/10—Photovoltaic [PV]
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02E—REDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
- Y02E10/00—Energy generation through renewable energy sources
- Y02E10/50—Photovoltaic [PV] energy
- Y02E10/56—Power conversion systems, e.g. maximum power point trackers
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Human Resources & Organizations (AREA)
- General Physics & Mathematics (AREA)
- Economics (AREA)
- Physics & Mathematics (AREA)
- Strategic Management (AREA)
- Databases & Information Systems (AREA)
- Entrepreneurship & Innovation (AREA)
- Marketing (AREA)
- Health & Medical Sciences (AREA)
- Tourism & Hospitality (AREA)
- Data Mining & Analysis (AREA)
- General Business, Economics & Management (AREA)
- General Engineering & Computer Science (AREA)
- Game Theory and Decision Science (AREA)
- Quality & Reliability (AREA)
- Public Health (AREA)
- Water Supply & Treatment (AREA)
- General Health & Medical Sciences (AREA)
- Primary Health Care (AREA)
- Computing Systems (AREA)
- Operations Research (AREA)
- Educational Administration (AREA)
- Development Economics (AREA)
- Power Engineering (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Storage Device Security (AREA)
Abstract
The invention discloses a micro-grid energy cloud model control method based on a multi-tenant technology. According to the method, tenant model isolation is performed through a database mode (schema), tenant models and data are stored by utilizing a database view and a database entity table, three multi-tenant modes of an independent database, the independent database mode (schema) and a shared data table are fused, definition of different data storage schemes of tenants can be achieved through configuration, meanwhile, a unified data access interface is provided for the outside through data services, and a human-computer interface or a service function does not need to pay attention to storage details of different microgrid tenant models, so that different data isolation schemes are provided for microgrids of different scales from the aspects of data storage cost, backup recovery cost and safety.
Description
Technical Field
The invention relates to a micro-grid energy cloud model control method and system based on a multi-tenant technology, and belongs to the technical field of micro-grid energy management.
Background
The microgrid energy cloud mainly provides SaaS microgrid energy management services for microgrid energy monitoring and management users such as photovoltaic car sheds, park microgrid and island microgrid, ownership and use rights of the microgrid belong to different owners, and one owner also manages a plurality of microgrids. Each micro-grid needs independent operation environment for system acquisition, monitoring operation, analysis optimization and the like, and the requirements on safety of data isolation are high.
In the prior art, various data manufacturers basically follow three architectures on the support of multiple tenants, namely an independent database, an independent database mode (schema) and a shared data table, wherein the independent database mode provides an independent database for each microgrid, so that data among the microgrids are not affected, the safety is high, and the storage cost is high; all microgrid data are stored in the same database in a data table sharing mode, a model data entity table is shared, different microgrid data are not isolated, the storage cost is low, and the safety is low; the independent database mode stores all microgrid data in one database, different microgrid data are isolated through the database mode, and both the safety and the storage cost are in a medium level. According to different specifications of micro-grids, the micro-grids can be divided into large-scale micro-grids such as a park micro-grid and an island micro-grid and small-scale micro-grids such as a photovoltaic car shed and user side energy storage, micro-grid customers with different scales comprehensively consider data storage cost, backup recovery cost and safety, different data isolation schemes are generally required to be customized, and meanwhile, data sharing of multiple micro-grid tenants is required to be considered for the condition that one owner manages multiple micro-grids. Therefore, by adopting the microgrid energy cloud system with a single architecture, different model control methods cannot be provided according to the requirements of different-scale microgrids.
Disclosure of Invention
In order to solve the defects of the prior art, the invention aims to provide a microgrid energy cloud model control system based on a multi-tenant technology, which integrates three multi-tenant modes of an independent database, an independent database mode (schema) and a shared data table, provides uniform data service resources, supports multi-tenant model data services, real-time data services, historical data services and the like, and further meets the requirements of different customers on data sharing and security isolation.
The technical scheme adopted by the invention is as follows:
a microgrid tenant is established, security isolation and logic combination are performed on the basis of the microgrid tenant, unified data services are adopted, and microgrid equipment model information isolation of different levels is performed.
A micro-grid energy cloud model control method based on a multi-tenant technology specifically comprises the following steps:
s1, the microgrid is used as a tenant of the microgrid energy cloud, microgrid tenant information is defined, and the microgrid tenant information comprises a data isolation type and a data source; the data isolation type comprises a shared database and an independent database, and a data source is a database access address.
S2, according to the data isolation type and the data source, creating a model data entity table required by the microgrid tenant in a database specified by the data source, wherein the model data entity table comprises uniformly named fields, and the fields are used for storing the tenant ID;
s3, judging whether the data isolation type is a shared database, if not, entering step S4, otherwise, creating a database mode (schema) for the microgrid tenants of the shared database, naming the database mode (tenant database mode) by tenant names, creating a view in the database mode based on a model data entity, wherein the view filters model data entity table data by taking tenant IDs as screening conditions, and realizes the logic isolation of the tenant model data based on the database mode;
s4, judging whether a model data entity table exists in a database corresponding to a data source, if the model data entity table does not exist, creating the model data entity table, wherein the created model data entity table comprises a tenant ID field, if the model data entity table exists, creating a parent tenant for a client managing a plurality of micro-grid tenants, creating a mapping relation between the tenant ID and the parent tenant, creating a database mode (schema) for the parent tenant (parent tenant database mode), naming the database mode by the name of the parent tenant, creating a view in the database mode based on the model data entity table, and filtering entity table data by taking a plurality of tenants IDs under the parent tenant as screening conditions to realize logic combination and data sharing of a plurality of tenant models under the same parent tenant;
s5, creating an independent database mode (schema) on a designated independent database for the tenant of the independent database, naming the independent database mode by the tenant name, and creating a model data entity table in the independent database mode to realize the physical isolation of the tenant model data based on the database;
s6, registering an account for the microgrid user, creating account information, wherein the account information comprises an account ID, and associating the account ID with the corresponding tenant ID;
storing and updating account information, microgrid tenant information and account and tenant mapping information;
synchronizing basic information between independent databases;
s7, requesting model data and measurement data from the data service, sending the tenant ID, the model ID and the measurement point ID to the data service, connecting the data service with a corresponding database according to a data source corresponding to the tenant, switching to a database mode named by the tenant name, and acquiring the model data and the measurement data from the switched database mode.
The basic information among the databases comprises microgrid account information, tenant information and account and tenant mapping information.
The model data is a microgrid equipment model established in a microgrid system and comprises photovoltaic, energy storage, a fan, loads, charging piles, switches and buses.
The measurement data is real-time data and historical data of the micro-grid measurement acquisition points.
The account information also includes an account name, an account alias, and an account password,
a micro-grid energy cloud model control system based on multi-tenant technology comprises a human-computer interface, a basic information management module, a tenant management module and a data service module;
the human-computer interface is used for human-computer interface request input and result output, the human-computer interface request input content comprises a microgrid model data request, a microgrid real-time data request and a microgrid historical data request, and the corresponding result output comprises microgrid model data, microgrid real-time data and microgrid historical data output.
The basic information management module maintains account information, microgrid tenant information and account and tenant mapping information and synchronizes basic information among independent databases;
the tenant management module creates a database mode, a model data entity table or a view required by the tenant in a database specified by a data source according to the name defined by the tenant, the tenant isolation type and the data source;
the data service module analyzes the human-computer interface request, and according to the tenant ID, the data source, the equipment model ID and the measuring point ID which are contained in the request, the data service module obtains model data (microgrid equipment model data) and measuring data (microgrid real-time data and historical data) from a corresponding database and returns the data to the human-computer interface.
The tenant management module working process specifically comprises the following steps,
s1, the microgrid is used as a tenant of the microgrid energy cloud, microgrid tenant information is defined, and the microgrid tenant information comprises a data isolation type and a data source; the data isolation type comprises a shared database and an independent database, and a data source is a database access address.
S2, according to the data isolation type and the data source, creating a model data entity table required by the microgrid tenant in a database specified by the data source, wherein the model data entity table comprises uniformly named fields, and the fields are used for storing the tenant ID;
s3, judging whether the data isolation type is a shared database, if not, entering step S4, otherwise, creating a database mode (schema) for the microgrid tenants of the shared database, naming the database mode by tenant names, creating a view in the database mode based on a model data entity table, wherein the view filters model data entity table data by taking tenant IDs as screening conditions, and logical isolation of the tenant model data based on the database mode is realized;
s4, judging whether a model data entity table exists in a database corresponding to a data source, if the model data entity table does not exist, creating the model data entity table, wherein the created model data entity table comprises a tenant ID field, if the model data entity table exists, creating a parent tenant for a client managing a plurality of micro-grid tenants, establishing a mapping relation between the micro-grid tenant ID and the parent tenant, creating a database mode (schema) for the parent tenant, naming the database mode by the name of the parent tenant, creating a view in the database mode based on the model data entity table, and filtering entity table data by taking a plurality of tenant IDs under the parent tenant as screening conditions through the view, so that the logic combination and data sharing of a plurality of tenant models under the same parent tenant are realized;
s5, creating an independent database mode (schema) on the appointed independent database for the tenant of the independent database, naming the independent database mode by the tenant name, and creating a model data entity table in the independent database mode to realize the physical isolation of the tenant model data based on the database.
The working process of the basic information management module comprises the following steps:
registering an account for a microgrid user (referring to an end user under a tenant, wherein the end user is in a one-to-many relationship with the tenant, namely one tenant can have a plurality of end users), wherein account information comprises an account ID, an account name, an account alias and an account password, and associating the account ID with the corresponding tenant ID;
storing and updating account information (the account information comprises an account ID, an account name, an account alias and an account password), microgrid tenant information and account-tenant mapping information;
and synchronizing basic information between independent databases (the basic information between the databases comprises microgrid account information, tenant information and account-tenant mapping information).
Users under different tenants request model data (the model data refers to a micro-grid equipment model established in a system) and measurement data from the data service module through a human-computer interface, a tenant ID, a model ID or a measurement point ID is sent to the data service module, the data service module is connected with a corresponding database according to a data source corresponding to the tenant, the mode is switched to a database mode named by the tenant name, and the model data or the measurement data are obtained from the switched database mode and returned to the human-computer interface.
Compared with the prior art, the invention has the beneficial effects that:
the invention discloses a micro-grid energy cloud model control method and system based on a multi-tenant technology, tenant model isolation is carried out through a database mode (schema), tenant models and data are stored by utilizing a database view and a database entity table, three multi-tenant modes of an independent database, an independent database mode (schema) and a shared data table are fused, definition of different data storage schemes of tenants can be realized through configuration, a unified data access interface is provided externally through data services, and a human-computer interface or a service function does not need to pay attention to storage details of different micro-grid tenant models, so that different data isolation schemes are provided for micro-grids of different scales from the aspects of data storage cost, backup recovery cost and safety.
According to the method, the micro-grid user control and Multi-Tenant (Multi Tenancy/Tenant) technology are combined, a new software architecture technology is established, the same system and components are shared under a Multi-user environment through virtual partitioning, and the data security isolation and personalized configuration of each user are guaranteed.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a framework of a micro-grid energy cloud model control method based on multi-tenant technology;
FIG. 2 is a system diagram of a micro grid energy cloud model control based on multi-tenant technology;
fig. 3 is a flowchart of a microgrid energy cloud model control method based on a multi-tenant technology.
Detailed Description
The present invention will be further described with reference to the accompanying drawings.
As shown in fig. 2, the invention provides a micro grid energy cloud model control system based on a multi-tenant technology, which includes a human-computer interface, a basic information management module, a tenant management module and a data service module; the modules support access of a plurality of independent databases, small-scale micro-grid tenant models with low data storage cost and low safety requirements are stored in the same database, medium-scale and large-scale micro-grid tenant models with high data storage cost and high data storage safety requirements are stored in the independent databases, the data service module can provide transparent data access for micro-grid users or upper-layer service application, and the users do not need to care about the physical position of data storage.
The basic information management module maintains basic information such as account information, microgrid tenant information, account and tenant mapping information and the like, wherein the account information comprises an account ID, an account name, an account alias and an account password, the tenant information comprises a tenant ID, a tenant name, a tenant alias and a parent tenant ID, and the account and tenant mapping information comprises a user ID and a tenant ID. The basic information management module is responsible for synchronizing basic information between independent databases.
And the tenant management module creates a database mode, an entity table or a view required by the tenant in a database specified by the data source according to the name defined by the tenant, the tenant isolation type and the data source. As shown in fig. 2, for a small-scale microgrid, if a database mode defined by a tenant of the microgrid is a shared database, a database mode (schema) is created for the tenant in the database, the database mode is named by the tenant name, a view is created in the database mode based on a model data entity table, and the view filters model data entity table data by using a tenant ID as a screening condition, so that the logical isolation of the tenant model data based on the database mode is realized; the method comprises the steps of establishing a parent tenant for a client managing a plurality of micro-grid tenants, establishing a mapping relation between the ID of the micro-grid tenant and the parent tenant, establishing a database mode (schema) for the parent tenant, naming the database mode by the name of the parent tenant, establishing a view in the database mode based on a model data entity table, and filtering entity table data by the view by taking the IDs of the plurality of tenants under the parent tenant as a screening condition to realize logic combination and data sharing of the plurality of tenant models under the same parent tenant. For medium and large-scale micro-grids, a database mode defined by a micro-grid tenant is an independent database, an independent database mode (schema) is established on a specified independent database, the independent database mode is named by the tenant name, a model data entity table is established in the independent database mode, and physical isolation of tenant model data based on the database is achieved.
And the data service module analyzes the human-computer interface request, and acquires model data and measurement data from a corresponding database and returns the model data and the measurement data according to the tenant ID, the data source, the equipment model ID and the measurement point ID contained in the request.
As shown in fig. 1, a microgrid tenant is created, security isolation and logic combination are performed based on the microgrid tenant, and a unified data service is adopted to perform information isolation of microgrid equipment models of different levels.
As shown in fig. 3, a method for controlling a micro-grid energy cloud model based on a multi-tenant technology specifically includes the following steps:
s1, the microgrid is used as a tenant of the microgrid energy cloud, microgrid tenant information is defined, and the microgrid tenant information comprises a data isolation type and a data source; the data isolation type comprises a shared database and an independent database, and a data source is a database access address.
The shared database provided by the present application is not the shared data table described in the background art, and the "shared database" actually includes an "independent database mode" + "shared data table", that is, models of multiple tenants are stored in a data table of one database, that is, a storage space is physically shared, but logically, a "database mode" is newly created for each tenant, and corresponding model data in the data table is extracted into a corresponding database mode in a database view (view) manner, so as to implement logical isolation.
S2, according to the data isolation type and the data source, creating a model data entity table required by the microgrid tenant in a database specified by the data source, wherein the model data entity table comprises uniformly named fields, and the fields are used for storing the tenant ID;
s3, judging whether the data isolation type is a shared database, if not, entering step S4, otherwise, creating a database mode (schema) for the microgrid tenants of the shared database, naming the database mode by tenant names, creating a view in the database mode based on a model data entity table, wherein the view filters model data entity table data by taking tenant IDs as screening conditions, and logical isolation of the tenant model data based on the database mode is realized;
s4, judging whether a model data entity table exists in a database corresponding to a data source, if the model data entity table does not exist, creating an entity table, wherein the created model data entity table comprises a tenant ID field, if the model data entity table exists, creating a parent tenant for a client managing a plurality of micro-grid tenants, establishing a mapping relation between the micro-grid tenant ID and the parent tenant, creating a database mode (schema) for the parent tenant, naming the database mode by the name of the parent tenant, creating a view in the database mode based on the model data entity table, and filtering the entity table data by taking a plurality of tenant IDs under the parent tenant as screening conditions through the view, so that the logic combination and data sharing of a plurality of tenant models under the same parent tenant are realized;
s5, creating an independent database mode (schema) on a designated independent database for the tenant of the independent database, naming the independent database mode by the tenant name, and creating a model data entity table in the independent database mode to realize the physical isolation of the tenant model data based on the database;
s6, registering an account for a microgrid user (referring to an end user under a tenant, wherein the end user is in one-to-many relationship with the tenant, namely one tenant can have a plurality of end users), creating account information, wherein the account information comprises an account ID, an account name, an account alias and an account password, and associating the account ID with the corresponding tenant ID;
storing and updating account information (the account information comprises an account ID, an account name, an account alias and an account password), microgrid tenant information and account-tenant mapping information;
and synchronizing basic information between independent databases (the basic information between the databases comprises microgrid account information, tenant information and account-tenant mapping information).
S7, users under different tenants request model data (the model data refers to microgrid equipment models established in the system, such as photovoltaic, energy storage, fans, loads, charging piles, switches, buses and the like) and measurement data (real-time data and historical data of microgrid measurement acquisition points) from the data service through a human-computer interface, the tenant ID, the model ID or the measurement point ID are sent to the data service module, the data service module is connected with a corresponding database according to a data source corresponding to the tenant, the database mode is switched to a database mode named by the tenant name, and the model data or the measurement data are obtained from the switched database mode and returned to the human-computer interface.
As shown in fig. 2, a microgrid energy cloud model control system based on a multi-tenant technology includes a human-computer interface, a basic information management module, a tenant management module, and a data service module; the basic information management module, the tenant management module and the data service module support the access of a plurality of independent databases,
the human-computer interface is used for human-computer interface request input and result output, the human-computer interface request input content comprises a microgrid model data request, a microgrid real-time data request and a microgrid historical data request, and the corresponding result output comprises microgrid model data, microgrid real-time data and microgrid historical data output.
The basic information management module maintains account information (the account information comprises an account ID, an account name, an account alias and an account password), microgrid tenant information and account and tenant mapping information, and synchronizes basic information between independent databases (the basic information between the databases refers to the microgrid account information, the tenant information and the account and tenant mapping information);
the tenant management module creates a database mode, an entity table or a view required by the tenant in a database specified by a data source according to the name defined by the tenant, the tenant isolation type and the data source;
the data service module analyzes the human-computer interface request, and acquires model data (microgrid equipment model data) and measurement data (microgrid real-time data and historical data) from a corresponding database and returns the model data and the measurement data according to a tenant ID, a data source, an equipment model ID and a measurement point ID which are contained in the request.
The tenant management module work process specifically includes the following steps, as shown in fig. 3:
s1, the microgrid is used as a tenant of the microgrid energy cloud, microgrid tenant information is defined, and the microgrid tenant information comprises a data isolation type and a data source; the data isolation type comprises a shared database and an independent database, and a data source is a database access address.
S2, according to the data isolation type and the data source, creating a model data entity table required by the microgrid tenant in a database specified by the data source, wherein the model data entity table comprises uniformly named fields, and the fields are used for storing the tenant ID;
s3, judging whether the data isolation type is a shared database, if not, entering step S4, otherwise, creating a database mode (schema) for the microgrid tenants of the shared database, naming the database mode by tenant names, creating a view in the database mode based on a model data entity table, wherein the view filters model data entity table data by taking tenant IDs as screening conditions, and logical isolation of the tenant model data based on the database mode is realized;
s4, judging whether a model data entity table exists in a database corresponding to a data source, if the model data entity table does not exist, creating an entity table, wherein the created model data entity table comprises a tenant ID field, if the model data entity table exists, creating a parent tenant for a client managing a plurality of micro-grid tenants, establishing a mapping relation between the micro-grid tenant ID and the parent tenant, creating a database mode (schema) for the parent tenant, naming the database mode by the name of the parent tenant, creating a view in the database mode based on the model data entity table, and filtering the entity table data by taking a plurality of tenant IDs under the parent tenant as screening conditions through the view, so that the logic combination and data sharing of a plurality of tenant models under the same parent tenant are realized;
s5, creating an independent database mode (schema) on the appointed independent database for the tenant of the independent database, naming the independent database mode by the tenant name, and creating a model data entity table in the independent database mode to realize the physical isolation of the tenant model data based on the database.
The working process of the basic information management module comprises the following steps:
registering an account for a microgrid user (referring to an end user under a tenant, wherein the end user is in a one-to-many relationship with the tenant, namely one tenant can have a plurality of end users), wherein account information comprises an account ID, an account name, an account alias and an account password, and associating the account ID with the corresponding tenant ID;
storing and updating account information (the account information comprises an account ID, an account name, an account alias and an account password), microgrid tenant information and account-tenant mapping information;
and synchronizing basic information between independent databases (the basic information between the databases comprises microgrid account information, tenant information and account-tenant mapping information).
Users under different tenants request model data (the model data refers to a micro-grid equipment model established in a system) and measurement data from the data service module through a human-computer interface, a tenant ID, a model ID or a measurement point ID is sent to the data service module, the data service module is connected with a corresponding database according to a data source corresponding to the tenant, the mode is switched to a database mode named by the tenant name, and the model data or the measurement data are obtained from the switched database mode and returned to the human-computer interface.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or groups of devices in the examples disclosed herein may be arranged in a device as described in this embodiment, or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. Modules or units or groups in embodiments may be combined into one module or unit or group and may furthermore be divided into sub-modules or sub-units or sub-groups. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to perform the method of the invention according to instructions in said program code stored in the memory.
By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer-readable media includes both computer storage media and communication media. Computer storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of computer readable media.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense, and the scope of the present invention is defined by the appended claims.
Claims (10)
1. A micro-grid energy cloud model control method based on multi-tenant technology is characterized in that,
and establishing a microgrid tenant, performing security isolation and logic combination based on the microgrid tenant, and performing microgrid equipment model information isolation of different levels by adopting uniform data service.
2. The microgrid energy cloud model control method based on the multi-tenant technology is characterized by comprising the following steps of:
s1, the microgrid is used as a tenant of the microgrid energy cloud, microgrid tenant information is defined, and the microgrid tenant information comprises a data isolation type and a data source; the data isolation type comprises a shared database and an independent database;
s2, according to the data isolation type and the data source, creating a model data entity table required by the microgrid tenant in a database specified by the data source, wherein the model data entity table comprises uniformly named fields, and the fields are used for storing the tenant ID;
s3, judging whether the data isolation type is a shared database, if not, entering step S4, otherwise, creating a database mode for the microgrid tenants of the shared database, naming the database mode by tenant names, creating a view in the database mode based on a model data entity table, wherein the view filters model data entity table data by taking tenant IDs as screening conditions, and logical isolation of the tenant model data based on the database mode is realized;
s4, judging whether a model data entity table exists in a database corresponding to a data source, if the model data entity table does not exist, creating the model data entity table, wherein the created model data entity table comprises a tenant ID field, if the model data entity table exists, creating a parent tenant for a client managing a plurality of micro-grid tenants, creating a mapping relation between the tenant ID and the parent tenant, creating a database mode for the parent tenant, naming the database mode by the parent tenant name, creating a view in the database mode based on the model data entity table, and filtering entity table data by taking a plurality of tenant IDs under the parent tenant as screening conditions through the view, so that the logic combination and data sharing of a plurality of tenant models under the same parent tenant are realized;
s5, creating an independent database mode on a designated independent database for the tenant of the independent database, naming the independent database mode by the tenant name, and creating a model data entity table in the independent database mode to realize the physical isolation of tenant model data based on the database;
s6, registering an account for the microgrid user, creating account information, wherein the account information comprises an account ID, and associating the account ID with the corresponding tenant ID;
storing and updating account information, microgrid tenant information and account and tenant mapping information;
synchronizing basic information between independent databases;
s7, requesting model data and measurement data from the data service, sending the tenant ID, the model ID and the measurement point ID to the data service, connecting the data service with a corresponding database according to a data source corresponding to the tenant, switching to a database mode named by the tenant name, and acquiring the model data and the measurement data from the switched database mode.
3. The method for controlling the energy cloud model of the micro-grid based on the multi-tenant technology as claimed in claim 2,
the basic information among the databases comprises microgrid account information, tenant information and account and tenant mapping information.
4. The method for controlling the energy cloud model of the micro-grid based on the multi-tenant technology as claimed in claim 2,
the model data is a microgrid equipment model established in a microgrid system and comprises photovoltaic, energy storage, a fan, loads, charging piles, switches and buses.
5. The method for controlling the energy cloud model of the micro-grid based on the multi-tenant technology as claimed in claim 2,
the measurement data is real-time data and historical data of the micro-grid measurement acquisition points.
6. The method for controlling the energy cloud model of the micro-grid based on the multi-tenant technology as claimed in claim 2,
the account information also includes an account name, an account alias, and an account password.
7. A micro-grid energy cloud model control system based on multi-tenant technology is characterized in that,
the system comprises a human-computer interface, a basic information management module, a tenant management module and a data service module;
the human-computer interface is used for requesting input and result output of the human-computer interface, the content of the human-computer interface request input comprises a microgrid model data request, a microgrid real-time data request and a microgrid historical data request, and the corresponding result output comprises the output of the microgrid model data, the microgrid real-time data and the microgrid historical data;
the basic information management module maintains account information, microgrid tenant information and account and tenant mapping information and synchronizes basic information among independent databases;
the tenant management module creates a database mode, a model data entity table or a view required by the tenant in a database specified by a data source according to the name defined by the tenant, the tenant isolation type and the data source;
and the data service module analyzes the human-computer interface request, and acquires model data and measurement data from a corresponding database and returns the model data and the measurement data according to the tenant ID, the data source, the equipment model ID and the measurement point ID contained in the request.
8. The micro-grid energy cloud model control system based on multi-tenant technology as claimed in claim 7,
the tenant management module working process specifically comprises the following steps,
s1, the microgrid is used as a tenant of the microgrid energy cloud, microgrid tenant information is defined, and the microgrid tenant information comprises a data isolation type and a data source; the data isolation type comprises a shared database and an independent database;
s2, according to the data isolation type and the data source, creating a model data entity table required by the microgrid tenant in a database specified by the data source, wherein the model data entity table comprises uniformly named fields, and the fields are used for storing the tenant ID;
s3, judging whether the data isolation type is a shared database, if not, entering step S4, otherwise, creating a database mode for the microgrid tenants of the shared database, naming the database mode by tenant names, creating a view in the database mode based on a model data entity table, wherein the view filters model data entity table data by taking tenant IDs as screening conditions, and logical isolation of the tenant model data based on the database mode is realized;
s4, judging whether a model data entity table exists in a database corresponding to a data source, if the model data entity table does not exist, creating the model data entity table, wherein the created model data entity table comprises a tenant ID field, if the model data entity table exists, creating a parent tenant for a client managing a plurality of micro-grid tenants, establishing a mapping relation between the micro-grid tenant ID and the parent tenant, creating a database mode for the parent tenant, naming the database mode by the parent tenant name, creating a view in the database mode based on the model data entity table, and filtering entity table data by taking a plurality of tenant IDs under the parent tenant as screening conditions through the view, so that the logic combination and data sharing of a plurality of tenant models under the same parent tenant are realized;
s5, creating an independent database mode on the appointed independent database for the tenant of the independent database, naming the independent database mode by the tenant name, and creating a model data entity table under the independent database mode to realize the physical isolation of the tenant model data based on the database.
9. The micro-grid energy cloud model control system based on multi-tenant technology as claimed in claim 7,
the working process of the basic information management module comprises the following steps:
registering an account for the microgrid user, wherein the account information comprises an account ID, an account name, an account alias and an account password, and the account ID is associated with the corresponding tenant ID;
storing and updating account information, microgrid tenant information and account and tenant mapping information; the account information comprises an account ID, an account name, an account alias and an account password;
basic information between independent databases is synchronized.
10. The micro-grid energy cloud model control system based on multi-tenant technology as claimed in claim 7,
users under different tenants request the data service module for model data and measurement data through the human-computer interface, the tenant ID, the model ID or the measurement point ID are sent to the data service module, the data service module is connected with a corresponding database according to a data source corresponding to the tenant, the database mode named by the tenant name is switched, and the model data or the measurement data are obtained from the switched database mode and returned to the human-computer interface.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010572572.2A CN111582773B (en) | 2020-06-22 | 2020-06-22 | Multi-tenant technology-based micro-grid energy cloud model control method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010572572.2A CN111582773B (en) | 2020-06-22 | 2020-06-22 | Multi-tenant technology-based micro-grid energy cloud model control method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111582773A true CN111582773A (en) | 2020-08-25 |
CN111582773B CN111582773B (en) | 2023-04-18 |
Family
ID=72127527
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010572572.2A Active CN111582773B (en) | 2020-06-22 | 2020-06-22 | Multi-tenant technology-based micro-grid energy cloud model control method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111582773B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112596857A (en) * | 2020-12-25 | 2021-04-02 | 北京知因智慧科技有限公司 | Method, device, equipment and medium for isolating SaaS multi-tenant data |
CN112995126A (en) * | 2021-01-25 | 2021-06-18 | 上海契云科技有限公司 | Management method for supporting multiple data isolation strategies by multi-tenant platform |
CN113609105A (en) * | 2021-08-20 | 2021-11-05 | 南威软件股份有限公司 | Method for realizing physical isolation of collaboration system data |
CN114745443A (en) * | 2022-05-09 | 2022-07-12 | 中国工商银行股份有限公司 | Service calling method, service calling device, computer equipment, storage medium and program product |
CN114760134A (en) * | 2022-04-18 | 2022-07-15 | 成都星云智联科技有限公司 | Multi-tenant isolation method and related device |
CN115062000A (en) * | 2022-08-05 | 2022-09-16 | 深圳竹云科技股份有限公司 | Data isolation method and device, computer equipment and storage medium |
CN116633691A (en) * | 2023-07-24 | 2023-08-22 | 四川航天天盛科技有限公司 | Cloud platform system based on SaaS and data storage method thereof |
-
2020
- 2020-06-22 CN CN202010572572.2A patent/CN111582773B/en active Active
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112596857A (en) * | 2020-12-25 | 2021-04-02 | 北京知因智慧科技有限公司 | Method, device, equipment and medium for isolating SaaS multi-tenant data |
CN112995126A (en) * | 2021-01-25 | 2021-06-18 | 上海契云科技有限公司 | Management method for supporting multiple data isolation strategies by multi-tenant platform |
CN113609105A (en) * | 2021-08-20 | 2021-11-05 | 南威软件股份有限公司 | Method for realizing physical isolation of collaboration system data |
CN114760134A (en) * | 2022-04-18 | 2022-07-15 | 成都星云智联科技有限公司 | Multi-tenant isolation method and related device |
CN114760134B (en) * | 2022-04-18 | 2024-05-28 | 成都星云智联科技有限公司 | Multi-tenant isolation method and related device |
CN114745443A (en) * | 2022-05-09 | 2022-07-12 | 中国工商银行股份有限公司 | Service calling method, service calling device, computer equipment, storage medium and program product |
CN115062000A (en) * | 2022-08-05 | 2022-09-16 | 深圳竹云科技股份有限公司 | Data isolation method and device, computer equipment and storage medium |
CN116633691A (en) * | 2023-07-24 | 2023-08-22 | 四川航天天盛科技有限公司 | Cloud platform system based on SaaS and data storage method thereof |
CN116633691B (en) * | 2023-07-24 | 2023-10-27 | 四川航天天盛科技有限公司 | Cloud platform system based on SaaS and data storage method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN111582773B (en) | 2023-04-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111582773B (en) | Multi-tenant technology-based micro-grid energy cloud model control method and system | |
CN103399942B (en) | A kind of data engine system supporting the many tenants of SaaS and method of work thereof | |
CN102103518B (en) | System for managing resources in virtual environment and implementation method thereof | |
CN103049482B (en) | The implementation method that in a kind of distributed heterogeneous system, data fusion stores | |
CN107426034A (en) | A kind of extensive container scheduling system and method based on cloud platform | |
US8397293B2 (en) | Suspicious node detection and recovery in mapreduce computing | |
US9342572B2 (en) | Workflow processing system and method with database system support | |
CN103942234A (en) | Method for operating multiple heterogeneous databases, middleware device and system | |
CN102917006B (en) | A kind of unified control and management method and device realizing computational resource and object permission | |
CN104866513A (en) | System and method for cross-tenant data access | |
CN111858615A (en) | Database table generation method, system, computer system and readable storage medium | |
CN103886104A (en) | Distributed real-time database management system and implementation method applicable to electric system | |
CN101901275A (en) | Distributed storage system and method thereof | |
CN111917587B (en) | Method for network service management by using service system and service system | |
CN107330580A (en) | Power marketing Base data platform construction method | |
CN105095103A (en) | Storage device management method and device used for cloud environment | |
CN103595799A (en) | Method for achieving distributed shared data bank | |
CN105681474A (en) | System architecture for supporting upper layer applications based on enterprise-level big data platform | |
CN105930417A (en) | Big data ETL (Extract-Transform-Load) interactive processing platform based on cloud computing | |
CN114691050B (en) | Cloud native storage method, device, equipment and medium based on kubernets | |
CN104298761A (en) | Implementation method for master data matching between heterogeneous software systems | |
CN114281790A (en) | Multi-type load resource aggregator access system and method | |
CN106056322A (en) | Smart grid scheduling system based on cloud computing | |
US20140136708A1 (en) | Orchestration management of information technology | |
CN107943423A (en) | The management method and computer-readable recording medium of storage resource in cloud system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |