CN202395813U - Agent system connected with database - Google Patents
Agent system connected with database Download PDFInfo
- Publication number
- CN202395813U CN202395813U CN2011205736850U CN201120573685U CN202395813U CN 202395813 U CN202395813 U CN 202395813U CN 2011205736850 U CN2011205736850 U CN 2011205736850U CN 201120573685 U CN201120573685 U CN 201120573685U CN 202395813 U CN202395813 U CN 202395813U
- Authority
- CN
- China
- Prior art keywords
- database
- server
- service
- service server
- thread pool
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The utility model provides an agent system connected with a database. The agent system comprises a service server, an agent server and a database server. The service server is connected with the agent server, and the agent server is connected with the database server. The service server is used for transmitting a service request to the agent server. The agent server comprises a receiver, a computer and a processor, wherein the receiver is connected with the computer, and the computer is connected with the processor. The receiver is used for receiving the service request transmitted by the service server and connecting the service server to the database in the database server corresponding to the service server. The computer is used for obtaining the importance parameter of each database according to the unit-time query transmission byte data and unit-time operand of the database. The processor is used for determining the priority of an established thread pool, and distributing the corresponding thread pool to process the service relevant to the corresponding database according to the priority of the thread pool and the importance parameter of the database.
Description
Technical field
The utility model belongs to database technical field, relates in particular to a kind of agency plant that connects database.
Background technology
In today that science and technology develops rapidly, it is ripe that development of database has been tending towards.For strengthening the fail safe of accessing database; Agent skill group is widely used; In prior art, application number is 02137696.4 invention " a kind of through the protocol agency mode Database Accessing Methods ", discloses a kind of through the protocol agency mode Database Accessing Methods.In the method; Client computer between the Database Systems through the agency by agreement module communication; This agency by agreement module be in charge of with Database Systems between communication be connected; Formation control and overtime control are carried out in the request of accessing database, and the conversion of protocol format between responsible client computer and the Database Systems.In addition, in the software realization mode of agency by agreement module, utilize configuration file, with specific format description agency by agreement module and communication protocol between the Database Systems and the protocol format conversion regime between client computer and the database.
Foregoing invention is through being provided with the agency by agreement module, realize that client computer is connected with communication between the Database Systems, and the protocol format that utilizes configuration file to describe between client computer and the database changed.Yet in the foregoing invention patent application, it is comparatively single that the configuration file that provides carries out the protocol format conversion regime, and the safety to database threatens easily.And all business are all adopted with a kind of processing mode, make that the Business Processing efficient of system is lower.
The utility model content
The utility model provides a kind of agency plant that connects database to address the above problem.
The utility model provides a kind of agency plant that connects database; Comprise service server, acting server and database server; Said service server connects said acting server; Said acting server connects said database server, and said service server is used for sending service request to said acting server.Said acting server comprises receiver, calculator and processor, and said receiver connects said calculator, and said calculator connects said processor.Said receiver after being used to receive the service request of service server transmission, is connected to the database in the database server corresponding with said service server with said service server.Said calculator is used for unit interval query transmission byte number and unit interval arithmetic operation number according to database, obtains the importance parameter of each database.Said processor, the priority of the thread pool that is used for confirm setting up, and distribute corresponding thread pool to handle the business relevant with correspondence database according to the priority of said thread pool and the importance parameter of database.
Compared to prior art; The agency plant of the connection database that provides according to the utility model; Acting server is set according to the different business request service server is connected to the database in the corresponding database server, the leakage of having avoided landing password has improved security of system.In addition, obtain the importance parameter of disparate databases and thread pool is distinguished priority, confirm the method for salary distribution of pending business with this.Above Processing tasks according to the corresponding database importance distribution thread pool of different business has improved the system business handling property.
Description of drawings
Accompanying drawing described herein is used to provide the further understanding to the utility model, constitutes the application's a part, and illustrative examples of the utility model and explanation thereof are used to explain the utility model, do not constitute the improper qualification to the utility model.In the accompanying drawings:
The sketch map of the agency plant for the connection database that provides according to the preferred embodiment of the utility model shown in Figure 1;
The workflow diagram of the agency plant for the connection database that provides according to the preferred embodiment of the utility model shown in Figure 2.
Embodiment
Hereinafter will and combine embodiment to specify the utility model with reference to accompanying drawing.Need to prove that under the situation of not conflicting, embodiment and the characteristic among the embodiment among the application can make up each other.
The sketch map of the agency plant for the connection database that provides according to the preferred embodiment of the utility model shown in Figure 1.As shown in Figure 1; The agency plant of the connection database that the utility model preferred embodiment provides comprises service server 1, acting server 2 and database server 3; Said service server 1 connects said acting server 2, and said acting server 2 connects said database server 3.Said service server 1 is used for sending service request to said acting server 2.Said acting server 2 comprises receiver 21, calculator 22 and processor 23, and said receiver 21 connects said calculator 22, and said calculator 22 connects said processor 23.Said receiver 21, be used to receive the service request that service server 1 sends after, said service server 1 is connected to the interior database of the database server corresponding with said service server 13.Said calculator 22 is used for unit interval query transmission byte number and unit interval arithmetic operation number according to database, obtains the importance parameter of each database.Said processor 23, the priority of the thread pool that is used for confirm setting up, and distribute corresponding thread pool to handle the business relevant with correspondence database according to the priority of said thread pool and the importance parameter of database.
The agency plant of the connection database that the another preferred embodiment of the utility model provides can also comprise caching server, and said service server is connected with said acting server through said caching server.
The workflow diagram of the agency plant for the connection database that provides according to the preferred embodiment of the utility model shown in Figure 2.As shown in Figure 2, the workflow of the agency plant of the connection database that the utility model preferred embodiment provides comprises step 101~103.
Step 101: acting server is connected to the database in the database server corresponding with said service server with said service server after receiving the service request of service server transmission.
Particularly, said service server can be web server or mail server, and said service server can directly be connected with said acting server, also can be connected with said acting server through caching server.Said service server sends service request to acting server, and passes through the unified key authentication that acting server is provided with.Next acting server is according to the ip address of service server or the database in ip address and the definite corresponding database server that needs to connect of service request; And obtaining the different accounts and the password of each database of login, service server is connected according to the foundation of said account and password and correspondence database.
For example, existing 3 service servers, and have different ip addresses respectively, and 3 databases are arranged in addition, all be positioned on the database server that the ip address is 10.1.1.4, the corresponding relation between service server and the database is as shown in the table.
Service server ip address | Database id | Database-name | Database server ip address | Account/password |
10.1.1.3 | 1 | test1 | 10.1.1.4 | B/B1 |
10.1.1.1 | 2 | test2 | 10.1.1.4 | C/C1 |
10.1.1.2 | 3 | test3 | 10.1.1.4 | D/D1 |
In last table; If acting server receives after the ip address is the service server of the 10.1.1.2 service request of sending; Database in the corresponding database server that acting server is confirmed to need to connect according to the ip address of this service server is 3 pairing databases, i.e. test3 database for database id.It is D1 for D, password that thereby service server obtains the corresponding account of test3 database, and the connection of foundation and corresponding test3 database.
On the other hand; If a plurality of databases on the corresponding disparate databases server of same service server; After acting server receives the service request of service server transmission; The database server that need connect is confirmed in ip address according to said service server, and confirms the database that should connect in this database server according to the pairing type of service of said service request, and corresponding account and password.Suppose that acting server receives the service request of the e type of service server transmission; And the corresponding f type service of database F that the corresponding e type service of the database E that database server 1 comprises, database server 2 comprise; Then acting server is after confirming that according to the ip address of said service server the database server that need connect is database server 1 or database server 2; The definite database that should connect of type of service that carries according to said service request again, i.e. database E.The connected mode of said service server and said database can for one to one, one-to-many and multi-to-multi mode, concrete mode is provided with according to the practical business demand, yet, this utility model is not made qualification.
Step 102: said acting server obtains the importance parameter of each database according to the unit interval query transmission byte number and the unit interval arithmetic operation number of database.
Particularly; Acting server according to the method that the unit interval query transmission byte number and the unit interval arithmetic operation number of database obtains database importance parameter is: said acting server obtains maximum and the maximum of unit interval arithmetic operation number of the unit interval query transmission byte number of each database; And both product that calculates, the importance parameter of each database equals the said product value of each database self and said product value and ratio value of all databases.
Wherein, the unit interval query transmission byte number of said database is the database transmissions byte total value in the unit interval and the ratio of said database query operations number in the unit interval.The unit interval database operation operand of said database is select, update, insert and the delete operation number sum of database in the unit interval.
According to the example in the step 101, if with 1 hour be the unit interval, obtain the maximum, the maximum among 24 unit interval database operation operands among the unit interval query transmission byte number first day 24 times, and calculate both products.The related data of 3 databases shown in the step 101 is for example shown in the following table.
In last table; The maximum of the unit interval query transmission byte number of 3 databases and the maximum product of unit interval arithmetic operation number with value be 100, then the importance parameter of test1 database is that the importance parameter of 42/100=0.42, test2 database is that the importance parameter of 18/100=0.18, test3 database is 40/100=0.4.
Above-mentioned unit interval query transmission byte number maximum by the mode of sky value is: draw by the actual maximum value calculation of unit interval every day query transmission byte number; The actual maximum of said unit interval query transmission byte number, i.e. maximum among 24 unit interval of whole day query transmission byte number.Said unit interval query transmission byte number maximum was the actual maximum of unit interval query transmission byte number in first day; Second day said unit interval query transmission byte number maximum is that the actual maximum of second day unit interval query transmission byte number and said unit interval query transmission byte number maximum addition in first day are divided by 2; The 3rd day said unit interval query transmission byte number maximum is that the 3rd day actual maximum of unit interval query transmission byte number and said unit interval query transmission byte number maximum addition in second day are divided by 2, by that analogy.Likewise, the peaked obtaining value method of unit interval sql arithmetic operation number is identical therewith, so repeat no more in this.
Step 103: said acting server is confirmed the priority of the thread pool of foundation, and distributes corresponding thread pool to handle the business relevant with correspondence database according to the priority of said thread pool and the importance parameter of database.
Particularly, acting server is set up the different threads pond in advance, and according to memory usage priority is distinguished in said different threads pond, and memory usage is low more, and priority is high more.Said acting server distributes the relevant business of the big database of higher thread pool processing of priority and importance more parameters.
According to the example in the step 102; The importance parameter of first day 3 database is respectively: Test1 is 0.42, Test2 is 0.18, Test3 is 0.4; If preset importance parameter is an one-level greater than the important level of 0.4 o'clock database; Smaller or equal to 0.4 important level greater than 0.2 o'clock database is secondary; Important level smaller or equal to 0.2 o'clock database is three grades, and then the important level of Test1 database is that the important level of one-level, Test3 database is a secondary, and the important level of Test2 database is three grades.Suppose that acting server sets up 3 thread pool a, b, c in advance, wherein thread pool a priority is high, and during thread pool b priority was, thread pool c priority was low.It is the relevant business of database of one-level that thread pool a is used to handle with corresponding important level; It is the relevant business of database of secondary that thread pool b is used to handle with corresponding important level, and it is three grades the relevant business of database that thread pool c is used to handle with corresponding important level.In this, thread pool a is used to handle the corresponding related service of Test1 database, and thread pool b is used to handle the corresponding related service of Test3 database, and thread pool c is used to handle the corresponding related service of Test2 database.
In sum; The agency plant of the connection database that preferred embodiment provides according to the utility model; Through the acting server secondary password is set, service server is connected to the database in the corresponding database server respectively through different passwords, improved security of system.In addition, obtain the importance parameter of disparate databases and thread pool is distinguished priority, confirm the processing mode of pending business with this.According to the corresponding relation of traffic assignments thread pool and database, improved Business Processing efficient.
The preferred embodiment that the above is merely the utility model is not limited to the utility model, and for a person skilled in the art, the utility model can have various changes and variation.All within the spirit and principle of the utility model, any modification of being done, be equal to replacement, improvement etc., all should be included within the protection range of the utility model.
Claims (2)
1. an agency plant that connects database is characterized in that, comprises service server, acting server and database server, and said service server connects said acting server, and said acting server connects said database server;
Said service server is used for sending service request to said acting server,
Said acting server comprises receiver, calculator and processor, and said receiver connects said calculator, and said calculator connects said processor,
Said receiver after being used to receive the service request of service server transmission, is connected to the database in the database server corresponding with said service server with said service server,
Said calculator is used for unit interval query transmission byte number and unit interval arithmetic operation number according to database, obtains the importance parameter of each database,
Said processor, the priority of the thread pool that is used for confirm setting up, and distribute corresponding thread pool to handle the business relevant with correspondence database according to the priority of said thread pool and the importance parameter of database.
2. system according to claim 1 is characterized in that, can also comprise caching server, and said service server is connected with said acting server through said caching server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011205736850U CN202395813U (en) | 2011-12-31 | 2011-12-31 | Agent system connected with database |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011205736850U CN202395813U (en) | 2011-12-31 | 2011-12-31 | Agent system connected with database |
Publications (1)
Publication Number | Publication Date |
---|---|
CN202395813U true CN202395813U (en) | 2012-08-22 |
Family
ID=46670712
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011205736850U Expired - Fee Related CN202395813U (en) | 2011-12-31 | 2011-12-31 | Agent system connected with database |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN202395813U (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102594798A (en) * | 2011-12-31 | 2012-07-18 | 苏州阔地网络科技有限公司 | Agent method and system for connecting databases |
CN104468248A (en) * | 2013-09-16 | 2015-03-25 | 腾讯科技(深圳)有限公司 | Service performance monitoring method, reverse proxy server, statistical analysis server and system |
US10726035B2 (en) | 2015-10-15 | 2020-07-28 | Huawei Technologies Co., Ltd. | Database access control method and apparatus |
-
2011
- 2011-12-31 CN CN2011205736850U patent/CN202395813U/en not_active Expired - Fee Related
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102594798A (en) * | 2011-12-31 | 2012-07-18 | 苏州阔地网络科技有限公司 | Agent method and system for connecting databases |
CN104468248A (en) * | 2013-09-16 | 2015-03-25 | 腾讯科技(深圳)有限公司 | Service performance monitoring method, reverse proxy server, statistical analysis server and system |
CN104468248B (en) * | 2013-09-16 | 2021-04-20 | 腾讯科技(深圳)有限公司 | Service performance monitoring method, reverse proxy server, statistical analysis server and system |
US10726035B2 (en) | 2015-10-15 | 2020-07-28 | Huawei Technologies Co., Ltd. | Database access control method and apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102594798A (en) | Agent method and system for connecting databases | |
CN102982141B (en) | A kind of method and device realizing distributed data base agency | |
US9775050B1 (en) | Spectrum access for fixed LTE user equipment | |
CN110851278A (en) | Distribution network automation master station mobile application service management method and system based on micro-service architecture | |
CN110599095B (en) | Block chain network-based hazardous waste treatment method and node of block chain network | |
WO2005024591A3 (en) | System and method for securely authorizing and distributing stored-value card data | |
CN104951524B (en) | A kind of mobile platform and its application method for database O&M | |
CN202395813U (en) | Agent system connected with database | |
CN113283778B (en) | Layered convergence federal learning method based on security evaluation | |
CN102638457B (en) | Method and system for automatically allocating server resource | |
CN106534202A (en) | Permission processing method and device | |
CN102456004B (en) | Query control method and system of page data | |
CN104821958B (en) | Electricity consumption data packet interactive interface method based on WebService | |
CN115115451A (en) | Block chain service management system for bulk commodity transaction supervision | |
CN104239486B (en) | A kind of method of data processing, system and relevant device | |
CN102740501A (en) | wireless network access point sharing method | |
CN103414732A (en) | Application integration device and application integration processing method | |
CN107257292B (en) | A kind of cross-domain distributed big data communication system design planning method | |
CN109067558A (en) | data service method and system | |
CN102611758B (en) | A kind of method utilizing load equalizer synchronized clusters data | |
CN113315753A (en) | Block data credibility recovery method based on coding technology | |
CN104993980A (en) | Long connection application access safety control method and system | |
CN112395570A (en) | Alliance chain intelligent contract calling authority control method, system and storage medium | |
CN107016278A (en) | A kind of authority distributing method, device and background management system | |
CN102413137B (en) | Data access method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C56 | Change in the name or address of the patentee | ||
CP01 | Change in the name or title of a patent holder |
Address after: Suzhou City, Jiangsu province 215121 Fengting Avenue Suzhou Industrial Park No. 666 Weiting Intelligent Industrial Park Building 8 Patentee after: Kuo Di education and science company limited Address before: Suzhou City, Jiangsu province 215121 Fengting Avenue Suzhou Industrial Park No. 666 Weiting Intelligent Industrial Park Building 8 Patentee before: Suzhou Kuodi Network Technology Co., Ltd. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20120822 Termination date: 20181231 |