The content of the invention
It is an object of the invention to overcome the deficiencies in the prior art, there is provided a kind of electrical network geography information for setting up tenant's driving
The method of Simulation spatial service.
The present invention solves its technical problem and takes technical scheme below to realize:
A kind of method of the electrical network geographical information space service for setting up tenant's driving, including step is as follows:
(1) system set up needed for the method, the system include multi-tenant access control center, monitoring and scheduling, space clothes
Business pond, storage resource and computing resource;
(2) deployment at multi-tenant access control center, multi-tenant access control center are to access electrical network geographical information space
The entrance of service system, is the control of authority center of tenant, realizes following function:
1. tenant is carried out creating, is deleted, and the quota that tenant can use is managed,
2. to tenant using the resource of electrical network geographical information space service system conduct interviews control,
3. carry out load balancing to tenant's access request, multi-tenant access control center provide tenant's management, Certificate Authority,
Resource trustship;
(3) monitoring and scheduling is set up, and monitoring and scheduling is electrical network geographical information space service system resource feelings to be used to each tenant
The monitoring of condition, allocated quota when being created according to each tenant, carries out the restriction that resource is used, specifically includes:
1. monitoring server, is responsible for receiving data and the status information that monitoring agent is collected;Be responsible for all monitoring devices and
Monitoring project configuration, the storage of data and the generation of form are sent with showing and reporting to the police;Service in Simulation spatial service pond is carried out
Scheduling, is responsible for running the state for acting on behalf of the host state and running example for uploading according to node, carries out the failure of running example
Transfer;
2. node operation agency, operates in a monitor component in monitored device, to collect in monitored device
Various monitoring datas, and send these data to monitoring server;
3. the data gathered by the configuration information and system of monitoring data, all monitored main frames and monitored project are all
Exist in time series database;
(4) Simulation spatial service pond is set up, Simulation spatial service pond is to operate in electrical network geographical information space service system basic environment
In service set, both including the standards service of electrical network geographical information space service system, also including each tenant according to business
Need the Simulation spatial service of extension;
(5) set up storage resource, storage resource is the storage system of electrical network geographical information space service system, storage it is interior
Appearance includes grid graph data, hosted data, metadata and monitoring data, and storage content is deposited by relevant database
Storage;
(6) computing resource is set up, computing resource is the computing capability of the offer of electrical network geographical information space service system, is wrapped
CPU, internal memory, hard disk, network are included, is the set of the computing capability of all hosts, the use of computing resource is using container skill
Art realizes Simulation spatial service for the access control of resource.
And, the tenant's management in the step (2) 3. includes establishment, the deletion of tenant of tenant, comprises the following steps that:
1. carry out creating the judgement that tenant still deletes tenant
2. the step is 1. if create comprising the following steps that for tenant:
A) essential information of tenant is set, and the essential information of tenant is as follows:
I. tenant numbers:The unique mark of tenant;
Ii. tenant's title:Operation system title corresponding to the tenant is described;
B) resource quota that tenant can use is set, and is written to tenant's quota table, the quota information that tenant uses is as follows:
I. addressable electric network data:According to the figure layer and unit of grid equipment, the electrical network that the tenant can access is set
Data;
Ii. the number of times of service call:The secondary of the electrical network geographical information space service system standards service that tenant accesses is set
Number;
Iii. the restriction of hosted data:Layer count restriction, hosted data including hosted data can take disk space
Size limit;
Iv. the restriction of trusteeship service:The computing resource that quantity restriction, trusteeship service including trusteeship service is taken when running
The upper limit, the transformation of the running example of the trusteeship service of operation;
C) authorization code that distribution is accessed:By essential information write tenant's table of tenant, and authorization code is returned, and, the step
The rapid authorization code is used when electrical network geographical information space service system is called for tenant, for whether verifying tenant's identity
It is legal;
3. the step is 1. if delete comprising the following steps that for tenant:
A) trusteeship service running example is deleted, it is described to comprise the following steps that:
I. service name, the numbering of tenant's trustship are got from metadata;
Ii. monitoring and scheduling module is notified, is responsible for deleting tenant's trusteeship service in Service Source pond by monitoring and scheduling module
Running example;
Iii. delete in metadata to the description information that services hosted by the tenant;
B) hosted data is deleted, it is described to comprise the following steps that:
I. title, the storage location of hosted data are got from metadata;
Ii. title according to hosted data, storage location, physics delete hosted data;
Iii. delete description information to data hosted by tenant in metadata;
C) relevant information of tenant is deleted, it is described to comprise the following steps that:
I. delete the essential information of the tenant in tenant's table;
Ii. delete instance address corresponding to trusteeship service in service pool running example table;
Iii. delete the related other information of tenant.
And, the Certificate Authority in the step (2) 3. is specifically included:
1. realize the checking to tenant's identity information, it is to avoid illegal request is processed;
2. according to loading condition, load balancing is carried out to the access request of tenant, is comprised the following steps that:
A) required parameter parsing, parses to the call request parameter that client, application end send, obtains under tenant
Column information:
I. tenant numbers;
Ii. authorization code;
Iii. service name:The service name can be the standards service that electrical network geographical information space service system is provided,
Can also be Simulation spatial service that tenant is extended according to service needed, the standards service described in the step is that electrical network geography information is empty
Between service system provide and by the basic electric network data access interface of the external offer of method of service, the standards service according to
Micro services are designed exploitation, and each micro services provides a class data access interface, a container instance in Simulation spatial service pond
One micro services of deployment;
B) tenant identification checking, reads tenant's list from tenant's table, verifies identifying whether effectively for tenant;
C) tenant's quota checking, reads the quota information of tenant from tenant's quota table, verifies whether this request reaches
The call number upper limit of tenant's accessible services;
D) distribute reference address, reading service pond running example table gets the reference address of running example.Change simultaneously
Data in tenant's quota table;
Wherein, the running example table includes following information, the Certificate Authority module in multi-tenant access control center from
The inventory of running example is obtained in running example table, and the mode according to poll distributes reference address:
I.IP, port:By IP address and port can have access to running example offer service, the running example,
Can be had access to from the external world by IP address and port;
Ii. tenant numbers:Which identify the running example to be created by tenant, if the service of electrical network geographical information space
The standards service that system is provided, is designated default tenant;
Iii. service name:Identify the service name that the running example is provided.
Iv. heart time:Call time in the heart beating for identifying the running example last time, if heart beating reports time gap
It is too remote, show that the service that the running example is provided is unavailable, not toward access request on the running example during load balancing;
V. last access time:Record this and record the recent access time of corresponding running example;
E) return result to tenant.
And, the resource trustship in the step (2) 3. includes spatial data trustship and the space of service application of tenant
The trustship of service, comprises the following steps that:
1. tenant identification checking, from tenant's table reads data, carries out tenant identification checking, if illegal tenant
Mark, terminates flow process;
2. tenant's quota checking, reads the quota data of tenant from tenant's quota table, the quota of tenant is verified, such as
Fruit tenant using quota already exceed the upper limit, terminate flow process;
3. judge resource trustship type:Service tray or Data Hosting,
A. if Data Hosting in the step, perform below step:
A) hosted data is uploaded, the hosted data of upload can be Shapefile file formats, Excel forms;
B) hosted data parsing and checking, the hosted data to uploading are verified, carry out the parsing of figure layer, obtain trustship
The following message of data:
I. the layers list
Ii. the mark of figure layer
Iii. figure layer field
Iv. coordinate system
C) hosted data priority assignation, arranges whether hosted data shares to other tenants' uses, if arranging what is shared
Type:
I. read:The tenant for sharing the hosted data may only read the spatial data in the tables of data of the hosted data;
Ii. write:The tenant for sharing the hosted data can increase new spatial data toward the tables of data of the hosted data;
D) hosted data storage, by the hosted data write into Databasce after verifying after parsing, and by the unit of hosted data
In data message write metadata table, and the priority assignation of previous step is recorded in tenant data control table;
The hosted data management is with following features:
There is unification in the electric network data in data and electrical network geographical information space service system i. hosted by service application
Data base;
Ii. hosted data table name in storage numbers the form of _ 64 GUIDs using tenant, it is to avoid trustship
The repetition of as shown by data;
Iii. the isolation of hosted data by tenant, shares three words of tenant and action type by logic isolation
Section is used for configuring the shared isolation rule that hosted data is shown in tenant, and tenant field shows the owner of data resource, gathers around
The person of having possesses total-control authority to data, can change sharing policy, shares and stops shared data, share tenant's field list
Whom bright data resource sharing gives, and in corresponding action type, action type includes two kinds of reading and writing to shared authority records, rents
Family can carry out symbolization to the data of trustship, issue into Map Services, and tenant by the data of trustship and can also have permission visit
The basic electrical network figure layer asked is combined, symbolization again, and issues into Map Services;
E) returning result;
B. if service tray in step, perform following step:
A) trusteeship service is uploaded, the program bag of trusteeship service is uploaded to ftp server, if the trusteeship service is simply right
The combination of electrical network geographical information space service system Plays service, need not access additional space data, then directly upload support
Pipe service.If trusteeship service is using have accessed additional space data, need by the spatial data of extra access with
The mode trustship of Data Hosting is in electrical network geographical information space service system;
B) service pool is deployed to, the trusteeship service of upload is deployed to service pool, more new metadata and service pond running example
Table, the service pool are the set of all Simulation spatial services, the standard for not only providing including electrical network geographical information space service system
Simulation spatial service, also including the Simulation spatial service of service application regarded as output controlling.All Simulation spatial services are designed out according to micro services
Send out, in micro services operation container instance, and by the establishment of dispatching and monitoring management micro services operation container instance, deletion, time-out;
Wherein, it is described to be deployed to comprising the following steps that for service pool:
I. the example quantity of resource service condition and needs operation of the monitor scheduler according to each host, notifies phase
Agent on the host answered creates running example;
Ii.Agent downloads foundation image file and program bag from ftp server according to the establishment instruction for receiving, and creates
Go out running example, foundation image file includes the required middleware of Simulation spatial service operation, the basic environment of operation;
Iii. monitor scheduler creates situation according to the example that Agent feeds back, and more new metadata and the operation of service pond are real
Example table;
C) return and terminate.
And, the monitoring server in the step (3) 1. has following features:
1. monitoring server is individually disposed, and is issued monitoring data collection service and is reported monitoring number by each node operation agency
According to;
2. monitoring server active analysis monitoring data, and generate the form of analysis resource service condition;
3. monitoring server is responsible for maintenance operation example table;
4. monitoring server be responsible for notify node operation agent maintenance host on running example, including it is newly-built, delete,
Operation suspension example;
In the step (3), 2. node operation agency has following features:
1. a host disposes a node operation agency, and active reporting collection is acted on behalf of in the node operation on host
Monitoring data;
2. node runs the existing state of agent monitors place host, and reports a host at set intervals
Existing state;
3. node operation agency is responsible for the existing state of host upper container, and reports the survival of container at set intervals
State;
4. node runs the resource service condition of agent monitors host, and reports a host at set intervals
Resource service condition, if reaching early warning value, monitoring server is no longer past to create new running example thereon;
5. node operation agency according to monitoring server send instruction, create on host new running example or
Delete running example;
6. node operation agency provides the connection pool of connection background data base, and the connection for providing data base for running example turns
Send out;
Monitoring data in the step (3) 3. specifically includes following content:
1. the CPU usage of host;
2. the memory usage of host;
3. the load mean value of host;
4. network traffics of host;
5. the disk usage amount of host;
6. the heartbeat message of host;
7. the heartbeat message of running example.
And, the Simulation spatial service pond of the step (4) has following feature:
1. container technique is adopted, the running example of multiple containers on a host, is run;
2. running example can pass through the IP address of host and port accesses, the running example IP on same host
Address is identical, but the port for using is different;
3. the computing resource of the host that each running example can be used is specified when the running example is created, and in operation
It is controlled in example running;
4. the running example independent operating on same host, running environment are mutually isolated, the extension of some running example
Fall, do not affect the operation of other running examples on same host;
5. the standards service that electrical network geographical information space service system is provided is developed according to the mode of micro services, tenant
Also developed according to the mode of micro services according to the spatial Information Service of service application regarded as output controlling, each running example have and
The Simulation spatial service of a standards service or regarded as output controlling is disposed only;
6. each running example reports the running status of itself by node operation agency;
7. each running example is operated by node operation agency's connection background data base.
And, the grid graph data in the step (5) refers to the graph data of basic grid equipment, including electrical network sets
Standby position coordinateses, the determinant attribute of equipment and topological connection relation, basic grid equipment graph data is according to grid equipment pipe
Reason specialty carries out Bedding storage, and basic grid graph data conducts interviews control according to equipment affiliated unit;
Hosted data in the step (5) is the sky that service application is stored in electrical network geographical information space service system
Between data.The hosted data of different tenants is isolated by logic, and electrical network geographical information space service system provides trustship number
According to storage, management storage spatial data;
Metadata in the step (5), is that all kinds of data storages in electrical network geographical information space service system are entered
Capable description, including but do not limit to following message:
1. the description of basic electric network data;
2. the description of hosted data;
3. tenant's information;
The data of the various monitoring collections of supervising data storage in the step (5), using time series data library storage, data
Content includes but is not limited to following information:
1. the CPU usage of host;
2. the memory usage of host;
3. the load mean value of host;
4. network traffics of host;
5. the disk usage amount of host;
6. the heartbeat message of host;
7. the heartbeat message of running example.
Advantages of the present invention and good effect are
1st, the present invention utilizes multi-tenant technology, and each tenant of energy valid metric is for electrical network geographical information space service system
Resource service condition, takes the more service application scenes of computing resource so as to targetedly improve.
2nd, the present invention utilizes multi-tenant technology, by the quota control to each tenant, including the grid equipment that can be used,
CPU is using accounting, internal memory using limit, call number limit etc., it is to avoid the irrational resource consumption of certain tenant is caused to other
The impact of the hosted service of tenant or the irrational resource consumption of certain tenant cause whole electrical network spatial Information Service system
Paralysis.
3rd, the present invention utilizes multi-tenant technology, the space clothes that each tenant can be according to needed for service application needs to extend itself
Business, and trustship is in electrical network spatial Information Service system, electrical network Simulation spatial service system provides the monitoring of trusteeship service and operation is real
The scheduling of example.
4th, the present invention utilizes multi-tenant technology, and each tenant can be according to the space number needed for service application needs to extend itself
According to figure layer, and trustship is in electrical network spatial Information Service system, and electrical network Simulation spatial service system provides the unified management of hosted data
With the control of authority for accessing.
Specific embodiment
Hereinafter the embodiment of the present invention is further described, following examples are descriptive, be not it is determinate, no
Protection scope of the present invention can be limited with this.
A kind of method of the electrical network geographical information space service for setting up tenant's driving, including step is as follows:
(1) system is by multi-tenant access control center, monitoring and scheduling, Simulation spatial service pond, storage resource, computing resource group
Into seeing Fig. 1 electrical network geographical information space service system installation drawings.
(2) multi-tenant access control center is the entrance for accessing electrical network geographical information space service system, is the power of tenant
Limit control centre.With following function:
1. tenant is carried out creating, is deleted, and the quota that tenant can use is managed
The resource (storage resource, computing resource etc.) of the electrical network geographical information space service system for 2. using to tenant is carried out
Access control
3. load balancing is carried out to tenant's access request
Multi-tenant access control center provides tenant's management, Certificate Authority, resource trustship.
Tenant's management in the step (2) includes establishment, the deletion of tenant of tenant, and its flow process is shown in that Fig. 2 tenant manages, tool
Body step is as follows:
1. create the judgement that tenant still deletes tenant
2. the step is 1. if create comprising the following steps that for tenant:
A) essential information of tenant is set, and the essential information of tenant is as follows:
I. tenant numbers:The unique mark of tenant
Ii. tenant's title:Operation system title corresponding to the tenant is described
B) resource quota that tenant can use is set, and is written to tenant's quota table.The quota information that tenant can use is such as
Under:
I. addressable electric network data:According to the figure layer and unit of grid equipment, the electrical network that the tenant can access is set
Data
Ii. the number of times of service call:The electrical network geographical information space service system standards service that tenant can access is set
Number of times
Iii. the restriction of hosted data:Including can hosted data layer count limit, that hosted data can take disk is empty
Between size limit
Iv. the restriction of trusteeship service:Including can trusteeship service quantity limit, trusteeship service run when take calculating money
The upper limit in source (internal memory, disk, CPU, network), the transformation of the running example of the trusteeship service that can be run
C) authorization code that distribution is accessed.By essential information write tenant's table of tenant, and return authorization code.
And, authorization code described in the step is used when electrical network geographical information space service system is called for tenant, is used
It is whether legal in checking tenant's identity.
D) terminate flow process.
3. the step is 1. if delete comprising the following steps that for tenant:
A) delete trusteeship service running example.It is described to comprise the following steps that:
I. service name, the numbering of tenant's trustship are got from metadata
Ii. monitoring and scheduling module is notified, is responsible for deleting tenant's trusteeship service in Service Source pond by monitoring and scheduling module
Running example
Iii. delete in metadata to the description information that services hosted by the tenant
B) delete hosted data.It is described to comprise the following steps that:
I. title, the storage location of hosted data are got from metadata
Ii. title according to hosted data, storage location, physics delete hosted data
Iii. delete description information to data hosted by tenant in metadata
C) delete the relevant information of tenant.It is described to comprise the following steps that:
I. delete the essential information of the tenant in tenant's table
Ii. delete instance address corresponding to trusteeship service in service pool running example table
Iii. delete the related other information of tenant
D) terminate flow process.
Certificate Authority in the step (2), the main function of realizing:
1. realize the checking to tenant's identity information, it is to avoid illegal request is processed
2. according to loading condition, load balancing is carried out to the access request of tenant
Its handling process is shown in Fig. 3 Certificate Authorities, comprises the following steps that:
1. required parameter parsing.The call request parameter that client, application end send is parsed, is obtained under tenant
Column information:
A) tenant's numbering
B) authorization code
C) service name:The service name can be the standards service that electrical network geographical information space service system is provided,
It can be Simulation spatial service that tenant is extended according to service needed.
Standards service described in the step is that electrical network geographical information space service system is provided and passes through method of service pair
The basic electric network data access interface of outer offer.The standards service is designed exploitation according to micro services, each micro services
A class data access interface is provided, a container instance disposes a micro services in Simulation spatial service pond.
2. tenant identification checking.Tenant's list is read from tenant's table, identifying whether effectively for tenant is verified.
3. tenant's quota checking.The quota information of tenant is read from tenant's quota table, verifies whether this request reaches
The call number upper limit of tenant's accessible services.
4. distribute reference address.Reading service pond running example table, gets the reference address of running example.Change simultaneously
Data in tenant's quota table.
The running example table includes following information, and the Certificate Authority module in multi-tenant access control center is real from operation
The inventory of running example is obtained in example table, and the mode according to poll distributes reference address:
A) IP, port:The service of running example offer can be had access to by IP address and port.The running example,
Can be had access to from the external world by IP address and port.
B) tenant's numbering:Which identify the running example to be created by tenant.If the service of electrical network geographical information space
The standards service that system is provided, is designated default tenant.
C) service name:Identify the service name that the running example is provided.
D) heart time:Call time in the heart beating for identifying the running example last time, if heart beating reports time gap
It is too remote, show that the service that the running example is provided is unavailable, not toward access request on the running example during load balancing.
E) last access time:Record this and record the recent access time of corresponding running example
5. return result to tenant.
Resource trustship in the step (2), including the support of the Simulation spatial service of the spatial data trustship and service application of tenant
Pipe, as shown in figure 4, its step is as follows:
1. tenant identification checking.Data are read from tenant's table, tenant identification checking is carried out.If illegal tenant
Mark, terminates flow process.
2. tenant's quota checking.The quota data of tenant is read from tenant's quota table, the quota of tenant is verified, such as
Fruit tenant using quota already exceed the upper limit, terminate flow process.
3. judge resource trustship type:Service tray or Data Hosting.
If Data Hosting in affiliated step, below step is performed:
A) upload hosted data.The hosted data of upload can be Shapefile file formats, Excel forms.
B) hosted data parsing and checking.Hosted data to uploading is verified, carries out the parsing of figure layer, obtain trustship
The following message of data:
I. the layers list
Ii. the mark of figure layer
Iii. figure layer field
Iv. coordinate system
C) hosted data priority assignation.Arrange whether hosted data can share to other tenants' uses, if can
To arrange the type that can be shared:
I. read:The tenant for sharing the hosted data may only read the spatial data in the tables of data of the hosted data.
Ii. write:The tenant for sharing the hosted data can increase new spatial data toward the tables of data of the hosted data.
D) hosted data storage.By in the hosted data write into Databasce after verifying after parsing, and by the unit of hosted data
In data message write metadata table, and the priority assignation of previous step is recorded in tenant data control table.
The hosted data management is with following features:
There is unification in the electric network data in data and electrical network geographical information space service system i. hosted by service application
Data base.
Ii. hosted data table name in storage adopts the form of " tenant numbers _ 64 GUIDs ", it is to avoid support
The repetition of pipe as shown by data.
Iii. by logic isolation, control schematic diagram is shown in Fig. 6 hosted datas for the isolation of hosted data.
It is used for configuring hosted data in sharing that tenant sees by tenant, three fields of shared tenant and action type
Isolation rule.
Tenant field shows the owner of data resource, and owner possesses total-control authority, Ke Yixiu to data
Change sharing policy, share and stop shared data;
Shared tenant's field shows data resource sharing to whom, and shared authority records are in corresponding action type.Behaviour
Include two kinds of reading and writing as type.
Iv. tenant can carry out symbolization to the data of trustship, issue into Map Services;Tenant can also be by the number of trustship
It is combined according to the basic electrical network figure layer with permission to access, symbolization again, and issues into Map Services.
The symbolization is the concept of GIS-Geographic Information System, refers to and arranges the symbol for showing to spatial data;
The Map Services are the concepts of GIS-Geographic Information System, and Map Services are often provided to the spatial data issued
Carry out inquiring about, show, map derivation, the function such as analysis of network, and the geographic information standard for supporting WMS, WFS, KML etc. general connects
Mouthful.Generally require to develop using the function provided by Map Services when extending new Simulation spatial service.
E) returning result.
If service tray in affiliated step, following step is performed:
A) upload trusteeship service.The program bag of trusteeship service is uploaded to ftp server.
If trusteeship service combination simply to the service of electrical network geographical information space service system Plays, without the need for visiting
Additional space data are asked, then directly uploads trusteeship service.If trusteeship service is using have accessed additional space number
According to, need by the spatial data of extra access in the way of Data Hosting trustship in electrical network geographical information space service system.
B) it is deployed to service pool.The trusteeship service of upload is deployed to service pool, more new metadata and service pond running example
Table.
The service pool is the set of all Simulation spatial services, is not only provided including electrical network geographical information space service system
Normed space is serviced, also including the Simulation spatial service of service application regarded as output controlling.All Simulation spatial services are set according to micro services
Meter exploitation, in micro services operation container instance, and by dispatching and monitoring manage micro services run the establishment of container instance, deletion,
Suspend.
It is described to be deployed to comprising the following steps that for service pool:
I. the example quantity of resource service condition and needs operation of the monitor scheduler according to each host, notifies phase
Agent (node operation agency) on the host answered creates running example.
Ii.Agent (node operation agency) downloads foundation image file from ftp server according to the establishment instruction for receiving
And program bag, it is created that running example.Foundation image file includes the required middleware of Simulation spatial service operation, the basis of operation
Environment.
Iii. monitor scheduler creates situation, more new metadata according to the example that Agent (node operation agency) feeds back
With service pool running example table.
C) return and terminate.
(3) monitoring and scheduling.Monitoring and scheduling is that electrical network geographical information space service system resource (storage money is used to each tenant
Source, computing resource) situation monitoring, allocated quota when being created according to each tenant carries out the restriction that resource is used.
The dispatching and monitoring includes following several ingredients, sees that the operation of Fig. 5 electrical network geographical information spaces service system is shown
It is intended to:
1. Server (monitoring server).It is responsible for receiving data and the status information that monitoring agent is collected;It is responsible for all prisons
Control equipment and monitoring project configuration, the storage of data and the generation of form are sent with showing, reporting to the police;To the clothes in Simulation spatial service pond
Business is scheduled, and is responsible for the state of the host state and running example uploaded according to Agent (node operation agency), is transported
The failure transfer of row example.
2. Agent (node operation agency).A monitor component in monitored device is operated in, it is monitored to collect
Various monitoring datas on equipment, and send these data to monitoring server.
3. monitoring data.The data gathered by the configuration information and system of all monitored main frames and monitored project are all
Exist in time series database.
And, in the ingredient, Server (monitoring server) is with following features:
1. Server (monitoring server) is individually disposed, and (node runs by each Agent to issue monitoring data collection service
Agency) report monitoring data.
2. Server (monitoring server) active analysis monitoring data, and generate the form of analysis resource service condition.
3. Server (monitoring server) is responsible for maintenance operation example table.
4. Server (monitoring server) is responsible for notifying the operation reality that Agent (node operation agency) is safeguarded on host
Example, including newly-built, deletion, operation suspension example.
And, in the ingredient, Agent (node operation agency) is with following features:
1. a host disposes an Agent (node operation agency), the Agent (node operation agency) on host
The monitoring data that active reporting is collected.
2. Agent (node operation agency) monitors the existing state of place host, and reports at set intervals once
The existing state of host.
3. Agent (node operation agency) is responsible for the existing state of host upper container, and reports appearance at set intervals
The existing state of device.
4. Agent (node operation agency) monitors the resource service condition of host, and reports at set intervals once
The resource service condition of host.If reaching early warning value, Server (monitoring server) is no longer past to create new operation thereon
Example.
5. the instruction that Agent (node operation agency) is sent according to Server (monitoring server), creates on host
New running example deletes running example.
6. Agent (node operation agency) provides the connection pool of connection background data base, provides data base for running example
Connection forwarding.
And, in affiliated ingredient, monitoring data includes following content:
1. the CPU usage of host
2. the memory usage of host
3. the load mean value of host
4. network traffics of host
5. the disk usage amount of host
6. the heartbeat message of host
7. the heartbeat message of running example
(4) Simulation spatial service pond.Simulation spatial service pond is operated in electrical network geographical information space service system basic environment
The set of service, both including the standards service of electrical network geographical information space service system, also including each tenant according to service needed
The Simulation spatial service of extension.
And, the Simulation spatial service pond has following feature:
I. container technique is adopted, the running example of multiple containers on a host, is run.
Ii. running example can pass through the IP address of host and port accesses.Running example on same host
IP address is identical, but the port for using is different.
Iii. the computing resource (CPU, internal memory, disk, network) of the host that each running example can be used should in establishment
Specify during running example, and be controlled in running example running.
Iv. the running example independent operating on same host, running environment are mutually isolated.The extension of some running example
Fall, do not affect the operation of other running examples on same host.
V. the standards service that electrical network geographical information space service system is provided is developed according to the mode of micro services;Tenant
Also developed according to the mode of micro services according to the spatial Information Service of service application regarded as output controlling.Each running example have and
The Simulation spatial service of a standards service or regarded as output controlling is disposed only.
Vi. each running example reports the running status of itself by Agent (node operation agency).
Vii. each running example is operated by Agent (node operation agency) connection background data base.
(5) storage resource.Storage resource is the storage system of electrical network geographical information space service system, the content bag of storage
Include grid graph data, hosted data, metadata, monitoring data.Storage content is stored by relevant database.
And, grid graph data described in the step refers to the graph data of basic grid equipment, including grid equipment
Position coordinateses, the determinant attribute of equipment, topological connection relation.Basic grid equipment graph data is according to power equipment management specialty
Carry out Bedding storage, basic grid graph data conducts interviews control according to equipment affiliated unit.
When hosted data described in the step refers to service application, service application has special grid equipment type to be opened up
Show, these special grid equipment type not having in basic grid graph data.Electrical network geographical information space service system
Provide the foundation framework, and each service application can be stored in electrical network geographical information space service system according to the needs of itself
Required special grid equipment, and realize that the superposition of these special grid equipments and basic grid graph data shows.
Hosted data described in the step is exactly the space that service application is stored in electrical network geographical information space service system
Data.The hosted data of different tenants is isolated by logic, and electrical network geographical information space service system provides hosted data
Storage, the spatial data that stores of management (create, delete, update).
Metadata described in the step, is to retouching that all kinds of data storages in electrical network geographical information space service system are carried out
State, including but do not limit to following message:
1. the description of basic electric network data
2. the description of hosted data
3. tenant's information
The data of the various monitoring collections of supervising data storage described in the step, using time series data library storage, in data
Hold and include but is not limited to following information:
1. the CPU usage of host
2. the memory usage of host
3. the load mean value of host
4. network traffics of host
5. the disk usage amount of host
6. the heartbeat message of host
7. the heartbeat message of running example
(6) computing resource.Computing resource is the computing capability of the offer of electrical network geographical information space service system, including
CPU, internal memory, hard disk, network, are the set of the computing capability of all hosts.
The use of the computing resource, is to realize Simulation spatial service for the access control of resource using container technique.
The ultimate principle of the present invention
The foundation of the present invention and method, including step is as follows:
(1) system is by multi-tenant access control center, monitoring and scheduling, Simulation spatial service pond, storage resource, computing resource group
Into, see Fig. 1 electrical network geographical information space service system installation drawings, Fig. 7 modules deployment schematic diagram, explanation are shown in the deployment of modules
It is as follows:
1. module multi-tenant access control center is deployed on two-server, master backup based on two-server is mutual.
2. container instance is run on each host, a container instance disposes a Simulation spatial service.On each host
One Agent of deployment (node operation agency), gathers status information, the fortune of each host by Agent (node operation agency)
The running status of container of the row on main frame, the running status of Simulation spatial service;Agent (node operation agency) at the same also be responsible for and
Background data base cluster sets up connection pool, and access of each container to data base is completed by Agent (node operation agency).
3. Server (dispatching and monitoring) is deployed in single server, is to ensure high availability, using active and standby deployment.
The responsible monitoring informations for receiving to report of Server (dispatching and monitoring) are simultaneously stored in time series database influxdb;Meanwhile,
Server (dispatching and monitoring) is responsible for carrying out container operation in fact to Agent (node operation agency) the transmission instruction on each host
The establishment of example, deletions etc. are operated.
4. time series database influxdb is responsible for storing monitoring data.Data-base cluster storage electric network data, hosted data,
Metadata.
5. running example table is stored using Memcached, is the high availability for ensureing running example table,
Memcached adopts active and standby deployment.
6. ftp server.Storage foundation image file and the program bag of the trusteeship service for uploading.Create running example from
Ftp server downloads required file.
(2) tenant is key concept as herein described, tenant's one integrated business application system of correspondence.Tenant has
Different quota restrictions, the quota of tenant are allocated when the tenant is created, and also can be adjusted in the later stage.It is available for tenant to make
Quota includes:
1. addressable electric network data:According to the figure layer and unit of basic grid equipment, arrange what the tenant can access
Electric network data;
2. the number of times of service call:The electrical network geographical information space service system standards service that tenant can access is set
Number of times;
3. the restriction of hosted data:Including can hosted data layer count limit, hosted data can take disk space
Size limit;
4. the restriction of trusteeship service:Including can trusteeship service quantity limit, trusteeship service run when take calculating money
The upper limit in source (internal memory, disk, CPU, network), the transformation of the running example of the trusteeship service that can be run.
(3) incoming authorization code is needed when tenant accesses electrical network geographical information space service system, authorization code is tenant's access
The identity of electrical network geographical information space service system, for verifying whether the tenant is legal.
(4) tenant's management is operated by the personnel for having administrator right in electrical network geographical information space service system.Wound
The essential information of tenant is set when building tenant, and distributes the upper limit that can use quota.The application scenarios of tenant mainly include tenant
Data Hosting, the service tray of tenant.
(5) implementation steps of tenant data trustship are as follows:
1. upload hosted data.The hosted data that tenant uploads can be Shapefile file formats, Excel forms.
2. hosted data parsing and checking.Trustship number of the resource trustship module in multi-tenant access control center to upload
According to being verified, the parsing of figure layer is carried out, obtain the following message of hosted data:
A) the layers list
B) mark of figure layer:The title of figure layer
C) figure layer field:Field name
D) coordinate system:The coordinate system of hosted data
3. hosted data priority assignation.Tenant has whole control authorities to the data of itself trustship, readable writeable, rents
The data sharing of oneself trustship can also use to other tenants by family, and the type that can be shared includes:
A) read:The tenant for sharing the hosted data may only read the spatial data in the tables of data of the hosted data.
B) write:The tenant for sharing the hosted data can increase new spatial data toward the tables of data of the hosted data.
4. hosted data storage.By in the hosted data write into Databasce after verifying after parsing, and by the unit of hosted data
In data message write metadata table, and the priority assignation of previous step is recorded in tenant data control table.Tenant data
Being embodied as trustship is as follows:
A) the basic electric network data in data and electrical network geographical information space service system hosted by service application is present
In unified storage data storehouse.
B) parsing obtains the layers list of hosted data, and corresponding table is created in data base, and the table name of hosted data is adopted
With the form of " tenant numbers _ 64 GUIDs ", it is to avoid the repetition of hosted data table name.
C) by logic isolation, logic isolation is realized by tenant data control table for the isolation of hosted data.Control is illustrated
Figure is shown in Fig. 6 hosted datas.Tenant data control table includes following field:
i.ID:Numbering, major key
Ii. resource object:Figure layer name/the table name of storage hosted data
Iii. the tenant:In the hosted data, figure layer is created by which tenant, and the tenant has whole to the data of trustship
Operating right
Iv. share tenant:A certain figure layer in the hosted data is shared to the tenant to use.The exercisable authority of the tenant
Record is in action type string.
V. action type:The shared tenant of record can use the authority of hosted data, action type to include two kinds of authorities of reading and writing
It is used for configuring hosted data in sharing that tenant sees by tenant, three fields of shared tenant and action type
Isolation rule.
D) returning result.
5. the implementation steps of tenant's service tray are as follows:
A) upload trusteeship service.When trusteeship service is service application, electrical network geographical information space service system standards service is not
When meeting demand, the new Simulation spatial service that service application is extended based on standard service components.The Simulation spatial service trustship fortune of new extension
, in electrical network geographical information space service system, the trusteeship service program storage of upload is on ftp server for row.
B) it is deployed to service pool.It is described to be deployed to comprising the following steps that for service pool:
The example quantity of resource service condition and needs operation of the i.Server (dispatching and monitoring) according to each host, meter
Calculate the quantity of the running example for needing to create on each host.
Ii.Server (dispatching and monitoring) sends instructions to Agent (node operation agency), and transmits foundation image file
(foundation image file includes the required middleware of Simulation spatial service operation, the basic environment of operation) and URL, the operation of program bag
The parameters such as CPU that example can be used, internal memory, network, disk.
Iii.Agent (node operation agency), according to the parameter for receiving, downloads foundation image file and program bag, creates
Go out running example.
The result of establishment is fed back to Server (dispatching and monitoring) by iv.Agent (node operation agency), and is responsible for more Singapore dollar
Data and service pool running example table.
V. return and terminate.
(6) implementation steps of tenant's access service:
1. the form of tenant's access service is as follows:
http://IP:Port/sggisserver/services/ tenant's numbering/service name/method nameParameter 1=
Parameter value & parameter 2=parameter value & parameter 3=Can Shuozhi &...& ginseng value 4=parameter values, if electrical network geographical information space clothes
The standards service that business system is provided, then tenant's numbering is default value gis, and all of standards service is under the jurisdiction of the special tenant of system
gis.The authorization code that tenant accesses is transmitted in HTTP heads.
2. required parameter parsing, obtains following message:
A) tenant's numbering:Service to be accessed belongs to the tenant.
B) service name:Service name to be accessed
C) authorization code
3. from tenant's table read tenant's information.Numbered according to tenant, verify that the tenant whether there is.
4. numbered according to tenant, decrypt authorization code, verify whether this access is legal.
5. numbered according to tenant, read quota information, if tenant reaches the quota upper limit to the access times for servicing, accessed
Failure;If access times are not up to the quota upper limit, distribute a reference address.The step distributes the concrete reality of reference address
Apply step as follows:
A) heart time in service pool running example table is identified and is called time in the heart beating of the running example last time, such as
Core is jumped onto and is called time away from too far away, shows that the service that the running example is provided is unavailable, and the inquiry of previous step is by its mistake
Filter.
B) last access time in service pool running example table identifies this to record corresponding running example nearest
Access time.Numbered according to tenant, service name, heart time inquiry service pool running example table obtains running example
The inventory of table, apart from the address recorded as access that present time is farthest in selection last access time field from inventory.
C) the middle last access time for updating selected record is current time.
D) backward reference address.
(7) implementation steps of tenant's quota restrictions.Each tenant is used in electrical network geographical information space service system
Resource limited by quota.Quota item in electrical network geographical information space service system includes:
1. addressable electric network data:According to the figure layer and unit of grid equipment, the basis that the tenant can access is set
Electric network data.After setting up the addressable basic electrical network figure layer of tenant, the Simulation spatial service of tenant's extension can not access which and can not visit
The basic electrical network figure layer asked.The data of its trustship and addressable basic electrical network figure layer can be combined by tenant, issue new
Graphical services out conduct interviews.
2. the number of times of service call:The electrical network geographical information space service system standards service that tenant can access is set
Number of times.In access service, the Certificate Authority module at multi-tenant access control center carries out the limit of service call number of times to tenant
System, when the upper limit that the number of times of service call reaches the full quota, accesses failure.
3. the restriction of hosted data:Including can hosted data layer count limit, hosted data can take disk space
Size limit.Tenant's hosted data be limited in tenant upload hosted data when be controlled, more than can hosted data figure
Layer number limit the upper limit, can take disk space size limit when, hosted data upload failure.
4. the restriction of trusteeship service:Including can trusteeship service quantity limit, trusteeship service run when take calculating money
The upper limit in source (internal memory, disk, CPU, network), the transformation of the running example of the trusteeship service that can be run.Each tenant
Can trusteeship service quantity upload trusteeship service bag when be controlled, more than can trusteeship service transformation, then upload support
Pipe service is unsuccessful.The upper limit of the computing resource (internal memory, disk, CPU, network) that trusteeship service is taken when running, by container
It is controlled, container technique provides outstanding resource isolation mechanism, the mutually isolated mutual not shadow of operation of each Simulation spatial service
Ring.The transformation of the running example of the trusteeship service that can be run is completed by Server (monitoring server), Server (monitoring
Server) monitoring running example quantity, Mobile state of going forward side by side adjustment.