CN106060004A - Database access method and database agent node - Google Patents

Database access method and database agent node Download PDF

Info

Publication number
CN106060004A
CN106060004A CN201610303562.2A CN201610303562A CN106060004A CN 106060004 A CN106060004 A CN 106060004A CN 201610303562 A CN201610303562 A CN 201610303562A CN 106060004 A CN106060004 A CN 106060004A
Authority
CN
China
Prior art keywords
database
access request
user terminal
business datum
broker node
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.)
Pending
Application number
CN201610303562.2A
Other languages
Chinese (zh)
Inventor
张锐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Longrise Technology Co Ltd
Original Assignee
Shenzhen Longrise Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Longrise Technology Co Ltd filed Critical Shenzhen Longrise Technology Co Ltd
Priority to CN201610303562.2A priority Critical patent/CN106060004A/en
Publication of CN106060004A publication Critical patent/CN106060004A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0884Network architectures or network communication protocols for network security for authentication of entities by delegation of authentication, e.g. a proxy authenticates an entity to be authenticated on behalf of this entity vis-à-vis an authentication entity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services

Abstract

A database access method disclosed by the present invention comprises the following steps of when a database access request sent by a user terminal is received, using a database agent node to verify the access authority of the user terminal based on the database access request; when the database access request passes the verification and is within a high-load time quantum of a database server corresponding to the database access request at present, using the database agent node to obtain the currently stored business data to which the received database access request points, and send the obtained business data to the user terminal; when the database access request passes the verification and is not in the high-load time quantum of the database server at present, using the database agent node to forward the received database access request to the database server to execute, and using the database server to return the business data to which the database access request points to the user terminal. The present invention also discloses the database agent node. According to the present invention, the working stability of the database server can be improved.

Description

Data bank access method and database broker node
Technology neighborhood
The present invention relates to Internet technical field, particularly relate to a kind of data bank access method and database broker node.
Background technology
Along with the high speed development of Internet technology, various with personalized operation, abundant content, active interaction forms Specialization comprehensive customer center website arise at the historic moment, the various e-commerce websites that emerge in large numbers the most in the recent period, microblogging website etc..
Aforementioned customer center website is all to provide content support, when visiting the most in a large number by the database server of rear end When asking request Concurrency, database server tends not to perform all of access request in time owing to performance limits, and causes response Postpone, even delay machine and stop service;Additionally, database server is before performing access request, in addition it is also necessary to access request Source carry out purview certification, what this needed also exist for consumption data storehouse server processes resource in a large number, will affect data further The stability of storehouse server work.
Summary of the invention
Present invention is primarily targeted at a kind of data bank access method of offer and system, it is intended to improve database server The stability of work.
For achieving the above object, the present invention provides a kind of data bank access method, and this data bank access method includes following Step:
When receiving the database access request that user terminal sends, database broker node is visited based on described data base Ask and ask the access rights of described user terminal are verified;
In the high load capacity time being verified and being currently located at database server corresponding to described database access request Time within Duan, described database broker node obtains the business datum that the current described database access request stored points to, and The business datum obtained is sent to described user terminal;
Time outside the high load capacity time period being verified and being currently located at described database server, described data base's generation Described database access request is forwarded to described database server and performs by reason node, described database server return institute State the business datum extremely described user terminal that database access request points to.
Alternatively, described database broker node by obtain business datum send to described user terminal step it Before, also include:
When obtaining the business datum failure stored, described database broker node obtains based on other database broker nodes Take and store the business datum that described database access request points to, and proceed to perform described database broker node by acquisition Business datum sends the step to described user terminal.
Alternatively, described database broker node is based on the described database access request access right to described user terminal After limit carries out the step verified, also include:
Time outside the high load capacity time period being verified and being currently located at described database server, described data base's generation Described database access request is forwarded to described database server and performs by reason node, described database server return institute State the business datum extremely described user terminal that database access request points to.
Alternatively, described database broker node is based on the described database access request access right to described user terminal The step that limit carries out verifying includes:
Described database broker node obtains the ID that described database access request carries, and judges described user The access rights that mark is corresponding, if include the access rights needed for the business datum that described database access request points to, if It is to be verified.
Alternatively, described data bank access method, also include:
The high load capacity time period information of each database server that described database broker node updates stores.
Additionally, for achieving the above object, the present invention also provides for a kind of database broker node, described database broker node Including:
Authentication module, for when receiving the database access request that user terminal sends, visiting based on described data base Ask and ask the access rights of described user terminal are verified;
Processing module, for being verified and be currently located at the database server that described database access request is corresponding The high load capacity time period within time, obtain the business datum that the current described database access request stored points to, and will obtain Business datum send to described user terminal;And,
Time outside the high load capacity time period being verified and being currently located at described database server, by described data base Access request is forwarded to described database server and performs, described database server return described database access request and refer to To business datum to described user terminal.
Alternatively, described processing module is additionally operable to, when obtaining the business datum failure stored, based on other data base's generations Reason node obtains and stores the business datum that described database access request points to.
Alternatively, described database broker node also includes:
Reminding module, for when authentication failed, returns information to described user terminal.
Alternatively, described authentication module is additionally operable to, and obtains the ID that described database access request carries, and judges Whether access rights corresponding to described ID include the access needed for the business datum that described database access request points to Authority, if being then verified.
Alternatively, described database broker node, also include:
More new module, for updating the high load capacity time period information of each database server of storage.
The data bank access method that the present invention proposes, is applied to database broker node, by database broker node generation The access authority verification of the source user terminal of reason database server database access request, and be verified and number When working according to storehouse server high load capacity, proxy database server provides data, services to user terminal, for database server Share part operating pressure so that database server has enough process resources to provide data, services, it is possible to promote data base The stability of server work.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of data bank access method first embodiment of the present invention;
Fig. 2 is the data base's topological structure exemplary plot in data bank access method first embodiment of the present invention;
Fig. 3 is the high-level schematic functional block diagram of database broker node first embodiment of the present invention.
The realization of the object of the invention, functional characteristics and advantage will in conjunction with the embodiments, are described further referring to the drawings.
Detailed description of the invention
Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
The present invention provides a kind of data bank access method, with reference to Fig. 1, in the first enforcement of data bank access method of the present invention In example, this data bank access method includes:
Step S10, when receiving the database access request that user terminal sends, database broker node is based on described The access rights of described user terminal are verified by database access request, if being verified and be currently located at described data base Within the high load capacity time period of the database server that access request is corresponding, then perform step S20, if being verified and present bit Outside the high load capacity time period of described database server, then perform step S30;
With reference to Fig. 2, the data base's topological structure exemplary plot applied for data bank access method of the present invention, as in figure 2 it is shown, count The multiple database servers being rear end according to storehouse agent node provide agency service, for any database server of rear end, If database broker node received within the high load capacity time period of this database server points to this database server Database access request, first carries out Authority Verification to the source user terminal of this database access request, and when being verified Use current storage implements the business datum offer service that described database access request points to, i.e. proxy database server Return, to the source user terminal of database access request, the business datum that database access request points to, alleviate database server Operating pressure, promote database server job stability.
Concrete, in embodiments of the present invention, user terminal provides visualized operation interface based on database server, Such as the web interface provided by browser;User terminal is receiving the URL of user's address field based on browser input, or The clicking operation that person's hyperlink address based on browser display triggers, or during other type of operation, generate and carry accordingly The database access request of URL (or IP address) and SQL statement sends to database broker node, to ask aforementioned URL Or the business datum that hyperlink address is corresponding;Described database broker node is receiving data base's visit that user terminal sends When asking request, the access rights of user terminal are verified by the database access request being primarily based on reception, and such as, user is eventually The database access request that end sends also carries user's user name based on user terminal pre-entered and the password of correspondence, number According to storehouse agent node when receiving the database access request that user terminal sends, the use carried according to database access request Whether the access rights of user terminal are verified by name in an account book and password, be the user authorized to determine the user of correspondence, if It is to determine that user terminal has access rights;Such as, the most aforementioned after determining that user is the user authorized, further root User gradation according to the user name pre-association of this authorized user, it is judged that whether it reaches to ask aforementioned data storehouse access request indication To the user gradation of business datum, if the most aforementioned user terminal has access rights.
It should be noted that in other embodiments, before above-mentioned steps S10, also include:
Data base's routing device receives the raw data base access request that described user terminal sends, described raw data base Access request carries the original URL of described user terminal requests, and described domain name corresponding for original URL is that described user terminal please The original domain name asked;Described data base's routing device returns to described user terminal and redirects response message, and described redirection rings The domain name corresponding for URL answering message to carry includes data base's generation that described data base's routing device is described user terminal selecting The node identification of reason node, sends database access request for described user terminal to described database broker node, by institute State database broker node and agency service is provided.
Such as, the URL that user terminal carries in the database access request that database broker node sends is http: // Www.XXX.com/news/a.html, wherein, content corresponding for www.XXX.com is provided by the database server on backstage, and And providing agency service by database broker node, data base's routing device is user terminal selecting one according to predetermined policy Database broker node, the node identification of the database broker node chosen is C1, then constructing new URL is http://C1/ www.XXX.com/news/a.html.User terminal sends database access request, before asking correspondence to described new URL State the business datum of the page.
Step S20, described database broker node obtains the business that the current described database access request stored points to Data, and the business datum obtained is sent to described user terminal;
In embodiments of the present invention, database broker node also stores the high load capacity of its each database server acted on behalf of Time period information, is likely to be at the time period of high load capacity for describing each database server.Wherein, high load capacity time period information Can be manually entered by the management personnel with authority, it is possible to united according to its real time operation load recorded by each database server Meter draws, and sends to database broker node.
It will be appreciated by persons skilled in the art that database server high load capacity work in the case of, its number of responses To substantially increase according to the delay of storehouse access request, and, along with the database access request sustainable growth received, data will be made The process resource consumption of storehouse server is totally, in fact it could happen that machine of delaying stops the situation of service.Therefore, in embodiments of the present invention, Database broker node completes the checking to user terminal access authority, and when being verified, if being currently located at described data Time within the high load capacity time period of the database server that storehouse access request is corresponding, first database broker node obtains current storage The business datum that the described database access request deposited points to, if getting, directly uses the business datum got to provide clothes Business.
Based on described above, it will be appreciated by persons skilled in the art that the effect of database broker node is when number When being in high load capacity work according to storehouse server, proxy database server completes the operation of part Authority Verification and provides part number According to service.Therefore, in the present embodiment, database broker node gets the industry that currently stored described data access request is pointed to During business data, directly the business datum obtained is sent to described user terminal, present to user for it.
It should be noted that in other embodiments, described database broker node does not also receive in preset time period During to the database access request of the business datum of sensing storage, delete the described business datum of storage.
Wherein, described preset time period can be configured according to actual needs, and such as, the present embodiment is by described preset time period It is set to 24 hours, it will be appreciated by persons skilled in the art that and be not accessed for business datum for a long time by periodically deletion, The utilization rate of database broker node storage space can be promoted, preferably to provide agency service.
Step S30, described database access request is forwarded to described database server by described database broker node Perform, described database server return the business datum extremely described user terminal that described database access request points to.
It is easily understood that outside the high load capacity time period being positioned at database server, i.e. database server is the highest During load operation, the data, services that database server can provide normally, database broker node obviously there is no need to carry For agency service.Therefore, in embodiments of the present invention, user terminal access authority is tested completing by database broker node Card, and when being verified, if being currently located at the high load capacity time period of database server corresponding to described database access request Outside time, database broker node directly the database access request of reception is forwarded to described database server perform, by Database server directly provides data, services to user terminal, and the business datum pointed to by described database access request returns To described user terminal.
Further, in embodiments of the present invention, database broker node is currently located at database server recognizing The high load capacity time period outside time, also judge currently whether stores the business datum that described database access request points to;
If not storing the business datum pointed by described database access request, then visit to its described data base received Ask the node identification adding himself in request, return the sensing of described database access request for described database server Business datum to while described user terminal, the business datum that described database server points to is back to described data Storehouse agent node;
Database broker node receive described database server return business datum after, will receive business Data save as the business datum that described database access request points to, for follow-up offer agency service.
The data bank access method that the present embodiment proposes, it is right to be completed by database broker node-agent database server The access authority verification of the source user terminal of database access request, and be verified and the work of database server high load capacity Time, proxy database server provides data, services to user terminal, shares part operating pressure for database server so that Database server has enough process resources to provide data, services, it is possible to promote the stability of database server work.
Further, based on first embodiment, it is proposed that the second embodiment of data bank access method of the present invention, in this reality Execute in example, described by before the business datum transmission obtained to described user terminal, also include:
When obtaining the business datum failure stored, described database broker node obtains based on other database broker nodes Take and store the business datum that described database access request points to, and proceed to perform described the business datum obtained sent extremely The step of described user terminal.
It should be noted that the difference of the present embodiment and first embodiment is, embodiment adds database broker Node obtains the process operation during business datum failure of storage, illustrates only for this difference below, and other repeat no more.
Based on described above, it will be appreciated by persons skilled in the art that the feelings that database server works at high load capacity Under condition, the delay of its response database access request will substantially increase, and, along with the database access request received persistently increases Long, the process resource consumption of database server will be made totally, in fact it could happen that machine of delaying stops the situation of service.Therefore, at this In inventive embodiments, described database broker node obtain storage business datum failure time, described database broker node Obtain and store, based on other database broker nodes, the business datum that described database access request points to, below with aforementioned number Being first agent's node according to storehouse agent node, other database broker nodes aforementioned are that second agent's node is specifically described:
First agent's node is when obtaining the business datum failure of storage, and the database access request received is forwarded to Second agent's node, wherein, first agent's node is added with for describing user terminal checking logical in database access request The identification information crossed, to avoid second agent's node to carry out secondary checking, causes the unnecessary process wasting of resources;Second agent Node, when receiving the database access request that first agent's node forwards, recognizes before this database access request carries Stating identification information, the business datum of the described database access request sensing directly obtaining storage is back to first agent's node; The business datum of reception, when receiving the business datum that second agent's node returns, is stored as described number by first agent's node The business datum pointed to according to storehouse access request, and this business datum is back to described user terminal.
The present embodiment is not storing the industry pointed by its database access request received by database broker node During business data, provide agency service based on other database broker nodes, it is ensured that user terminal can normally obtain data, services.
Further, based on first embodiment, the 3rd embodiment of data bank access method of the present invention is proposed, in this enforcement In example, after step S10, also include:
When authentication failed, described database broker node returns information to described user terminal.
It should be noted that the difference of the present embodiment and first embodiment is, embodiment adds verification operation and lose Process operation when losing, illustrates only for this difference below, and other repeat no more.
It is easily understood that in actual work process, there is the multiple situation causing access authority verification failed, example As, user have issued the database access request pointing to the business datum not possessing access rights based on user terminal, causes testing Demonstrate,prove unsuccessfully;The most such as, user have input the checking information (such as user name and/or password etc.) of mistake based on user terminal, causes Authentication failed.Therefore, for not having data to return user terminal after avoiding authentication failed for a long time, cause the puzzlement of user, and Unnecessary wait, in the present embodiment, when authentication failed, described agent node returns information to described user eventually End, is presented to user by user terminal, and such as, the information that database broker node returns is that " authentication failed, after please checking Request again ";The most such as, the information that database broker node returns is " not possessing access rights ".I.e. database broker Node returns corresponding information with specific reference to the reason of authentication failed.
Further, based on aforementioned any embodiment, it is proposed that the 4th embodiment of data bank access method of the present invention, In the present embodiment, step S10 includes:
Described database broker node obtains the ID that described database access request carries, and judges described user The access rights that mark is corresponding, if include the access rights needed for the business datum that described database access request points to, if It is to be verified.
It should be noted that the difference of the present embodiment and aforementioned any embodiment is, embodiment adds access Authority carries out the description of the concrete operations verified, is the most only described this difference, and other can respectively refer to aforementioned each enforcement Example, here is omitted.
In embodiments of the present invention, database broker node is receiving the database access request that user terminal sends Time, first parse the ID that this database service request carries, and according to the ID stored and access rights Mapping relations, determine the access rights that this ID is corresponding;Then the access rights that this ID is corresponding are determined whether Whether include the access rights needed for the business datum that described database access request points to, wherein, corresponding in this ID Access rights include needed for the business datum that described database access request points to access rights time, described user terminal Access authority verification is passed through.
Such as, database broker node is provided previously by authority information according to database server, divides and has 5 authorities etc. Level, wherein, Permission Levels are reduced successively by 1 grade to 5 grade, and the i.e. 1 grade access rights with highest ranking, 5 grades have minimum Access rights;Upper 1 grade includes the access rights of lower 1 grade, the i.e. 1 grade all access rights including 2 grades, and 2 grades include 3 grades all Access rights, by that analogy.Database broker node, when receiving the database access request that user terminal sends, first solves Separate out the ID that this database service request carries, and according to the ID stored and the mapping relations of access rights, Determine that access rights corresponding to this ID are 2 grades, the access needed for the business datum that described database access request points to Authority is 3 grades, it is clear that, 2 grades of all access rights including 3 grades, i.e. the access authority verification of this user terminal is passed through.
Further, based on aforementioned any embodiment, it is proposed that the 5th embodiment of data bank access method of the present invention, In the present embodiment, this data bank access method, also include:
The high load capacity time period information of each database server that described database broker node updates stores.
It should be noted that the difference of the present embodiment and aforementioned any embodiment is, embodiment adds data The renewal operation of the high load capacity time period information of storehouse server, is the most only described this difference, before other can respectively refer to Stating each embodiment, here is omitted.
In embodiments of the present invention, it is provided that three kinds of modes updating high load capacity time period information:
One, database broker node is when the renewal receiving the management personnel with default access instructs, according to connecing The instruction that updates received updates the high load capacity time period information of corresponding database server;
Its two, database broker node receive database server send high load capacity time period information time, will storage Deposit to should the high load capacity time period information updating of database server be the high load capacity time period information received;
Its three, the timing of database broker node sends and updates request to each database server, and is receiving each data During storehouse server high load capacity time period information based on the more newly requested return received, by the high load capacity of corresponding each data server Time period information is updated to the corresponding high load capacity time period information received respectively.
The present embodiment is by being updated the high load capacity time period information of each database server stored so that data Storehouse agent node can preferably provide agency service, promotes the stability of database server work further.
The present invention also provides for a kind of database broker node, with reference to Fig. 3, in the first reality of database broker node of the present invention Executing in example, this database broker node includes:
Authentication module 10, for when receiving the database access request that user terminal sends, based on described data base The access rights of described user terminal are verified by access request;
As in figure 2 it is shown, multiple database servers that database broker node is rear end provide agency service, for rear end Any database server, if database broker node receives finger within the high load capacity time period of this database server Carry out authority to the database access request of this database server, first the source user terminal to this database access request to test Card, and the business datum offer service that the current described database access request of enforcement stored of use points to when being verified, I.e. proxy database server returns, to the source user terminal of database access request, the business number that database access request points to According to, alleviate the operating pressure of database server, promote the job stability of database server.
Concrete, in embodiments of the present invention, user terminal provides visualized operation interface based on database server, Such as the web interface provided by browser;User terminal is receiving the URL of user's address field based on browser input, or The clicking operation that person's hyperlink address based on browser display triggers, or during other type of operation, generate and carry accordingly The database access request of URL (or IP address) and SQL statement sends to database broker node, to ask aforementioned URL Or the business datum that hyperlink address is corresponding;When receiving the database access request that user terminal sends, first by testing The access rights of user terminal are verified by card module 10 based on the database access request received, and such as, user terminal is sent out The database access request sent also carries user's user name based on user terminal pre-entered and the password of correspondence, is receiving During the database access request sent to user terminal, user name that authentication module 10 carries according to database access request and close Whether the access rights of user terminal are verified by code, be the user authorized to determine the user of correspondence, if then determining User terminal has access rights;The most such as, aforementioned after determining that user is the user authorized, authentication module 10 is further The user gradation of the user name pre-association according to this authorized user, it is judged that whether it reaches to ask aforementioned data storehouse access request institute Point to the user gradation of business datum, if the most aforementioned user terminal has access rights.
It should be noted that in other embodiments, database broker node, before providing agency service, also includes:
Data base's routing device receives the raw data base access request that described user terminal sends, described raw data base Access request carries the original URL of described user terminal requests, and described domain name corresponding for original URL is that described user terminal please The original domain name asked;Described data base's routing device returns to described user terminal and redirects response message, and described redirection rings The domain name corresponding for URL answering message to carry includes data base's generation that described data base's routing device is described user terminal selecting The node identification of reason node, sends database access request for described user terminal to described database broker node, by institute State database broker node and agency service is provided.
Such as, the URL that user terminal carries in the database access request that database broker node sends is http: // Www.XXX.com/news/a.html, wherein, content corresponding for www.XXX.com is provided by the database server on backstage, and And providing agency service by database broker node, data base's routing device is user terminal selecting one according to predetermined policy Database broker node, the node identification of the database broker node chosen is C1, then constructing new URL is http://C1/ www.XXX.com/news/a.html.User terminal sends database access request, before asking correspondence to described new URL State the business datum of the page.
Processing module 20, for being verified and be currently located at the database service that described database access request is corresponding Time within the high load capacity time period of device, obtain the business datum that the current described database access request stored points to, and will obtain The business datum taken sends to described user terminal;And,
Time outside the high load capacity time period being verified and being currently located at described database server, by described data base Access request is forwarded to described database server and performs, described database server return described database access request and refer to To business datum to described user terminal.
In embodiments of the present invention, database broker node also stores the high load capacity of its each database server acted on behalf of Time period information, is likely to be at the time period of high load capacity for describing each database server.Wherein, high load capacity time period information Can be manually entered by the management personnel with authority, it is possible to united according to its real time operation load recorded by each database server Meter draws, and sends to database broker node.
It will be appreciated by persons skilled in the art that database server high load capacity work in the case of, its number of responses To substantially increase according to the delay of storehouse access request, and, along with the database access request sustainable growth received, data will be made The process resource consumption of storehouse server is totally, in fact it could happen that machine of delaying stops the situation of service.Therefore, in embodiments of the present invention, Complete the checking to user terminal access authority at authentication module 10, and when being verified, visit if being currently located at described data base Time within the high load capacity time period of the database server that the request of asking is corresponding, processing module 20 obtain the described number of current storage The business datum pointed to according to storehouse access request, if getting, directly uses the business datum got to provide service.
Based on described above, it will be appreciated by persons skilled in the art that the effect of database broker node is when number When being in high load capacity work according to storehouse server, proxy database server completes the operation of part Authority Verification and provides part number According to service.Therefore, in the present embodiment, when getting the business datum that currently stored described data access request is pointed to, place The business datum obtained directly is sent to described user terminal by reason module 20, presents to user for it.
It should be noted that in other embodiments, described database broker node also includes removing module, in advance If do not receive the database access request of the business datum pointing to storage in the time period, delete the described business number of storage According to.
Wherein, described preset time period can be configured according to actual needs, and such as, the present embodiment is by described preset time period It is set to 24 hours, it will be appreciated by persons skilled in the art that and be not accessed for business datum for a long time by periodically deletion, The utilization rate of database broker node storage space can be promoted, preferably to provide agency service.
It is easily understood that outside the high load capacity time period being positioned at database server, i.e. database server is the highest During load operation, the data, services that database server can provide normally, database broker node obviously there is no need to carry For agency service.Therefore, in embodiments of the present invention, the checking to user terminal access authority is completed at authentication module 10, and When being verified, if being currently located at outside the high load capacity time period of database server corresponding to described database access request Time, the database access request of reception is directly forwarded to described database server and performs, data base takes by processing module 20 Business device directly provides data, services to user terminal, and the business datum that described database access request points to is back to described use Family terminal.
Further, in embodiments of the present invention, processing module 20 is recognizing the height being currently located at database server Time outside duration of load application section, also judge currently whether store the business datum that described database access request points to;
If not storing the business datum pointed by described database access request, then visit to its described data base received Ask the node identification adding its place database broker node in request, return described data for described database server While the business datum that storehouse access request is pointed to extremely described user terminal, the business datum that described database server is pointed to It is back to its place database broker node;
After receiving the business datum that described database server returns, the business datum that processing module 20 will receive Save as the business datum that described database access request points to, for follow-up offer agency service.
The database broker node that the present embodiment proposes, by proxy database server database access request The access authority verification of source user terminal, and being verified and during the work of database server high load capacity, proxy database Server provides data, services to user terminal, shares part operating pressure for database server so that database server Enough process resources are had to provide data, services, it is possible to promote the stability of database server work.
Further, based on first embodiment, it is proposed that the second embodiment of database broker node of the present invention, in this reality Executing in example, described processing module 20 is additionally operable to, when obtaining the business datum failure stored, based on other database broker nodes Obtain and store the business datum that described database access request points to.
It should be noted that the difference of the present embodiment and first embodiment is, embodiment adds database broker Node obtains the process operation during business datum failure of storage, illustrates only for this difference below, and other repeat no more.
Based on described above, it will be appreciated by persons skilled in the art that the feelings that database server works at high load capacity Under condition, the delay of its response database access request will substantially increase, and, along with the database access request received persistently increases Long, the process resource consumption of database server will be made totally, in fact it could happen that machine of delaying stops the situation of service.Therefore, at this In inventive embodiments, described processing module 20 is when obtaining the business datum failure of storage, based on other database broker nodes Obtain and store the business datum that described database access request points to, save with the database broker at processing module 20 place below Point is first agent's node, and other database broker nodes are that second agent's node is specifically described:
First agent's node (processing module 20) is when obtaining the business datum failure of storage, and the data base received visits The request of asking is forwarded to second agent's node, and wherein, first agent's node is added with for describing use in database access request The identification information that family terminal authentication passes through, to avoid second agent's node to carry out secondary checking, causes unnecessary process resource Waste;Second agent's node, when receiving the database access request that first agent's node forwards, recognizes this data base and visits The aforementioned identification information that the request of asking is carried, the business datum of the described database access request sensing directly obtaining storage is back to First agent's node;First agent's node receive second agent's node return business datum time, will receive business number According to being stored as the business datum that described database access request points to, and this business datum is back to described user terminal.
The present embodiment is not storing the industry pointed by its database access request received by database broker node During business data, provide agency service based on other database broker nodes, it is ensured that user terminal can normally obtain data, services.
Further, based on first embodiment, the 3rd embodiment of database broker node of the present invention is proposed, in this enforcement In example, described database broker node also includes:
Reminding module, for when authentication failed, returns information to described user terminal.
It should be noted that the difference of the present embodiment and first embodiment is, embodiment adds verification operation and lose Process operation when losing, is specifically performed by reminding module, illustrates only for this difference below, and other repeat no more.
It is easily understood that in actual work process, there is the multiple situation causing access authority verification failed, example As, user have issued the database access request pointing to the business datum not possessing access rights based on user terminal, causes testing Demonstrate,prove unsuccessfully;The most such as, user have input the checking information (such as user name and/or password etc.) of mistake based on user terminal, causes Authentication failed.Therefore, for not having data to return user terminal after avoiding authentication failed for a long time, cause the puzzlement of user, and Unnecessary wait, in the present embodiment, when authentication failed, reminding module returns information extremely described user terminal, by User terminal presents to user, and such as, the information that reminding module returns is " authentication failed, request again after please checking "; The most such as, the information that reminding module returns is " not possessing access rights ".I.e. reminding module is with specific reference to authentication failed Reason returns corresponding information.
Further, based on aforementioned any embodiment, it is proposed that the 4th embodiment of database broker node of the present invention, In the present embodiment, described authentication module 10 is additionally operable to, and obtains the ID that described database access request carries, and judges institute State whether access rights corresponding to ID include the access right needed for the business datum that described database access request points to Limit, if being then verified.
It should be noted that the difference of the present embodiment and aforementioned any embodiment is, embodiment adds access Authority carries out the description of the concrete operations verified, is the most only described this difference, and other can respectively refer to aforementioned each enforcement Example, here is omitted.
In embodiments of the present invention, when receiving the database access request that user terminal sends, authentication module 10 is first First parse the ID that this database service request carries, and close according to the mapping of the ID stored and access rights System, determines the access rights that this ID is corresponding;Then determine whether whether access rights corresponding to this ID wrap Include the access rights needed for the business datum that described database access request points to, wherein, in the access that this ID is corresponding When authority includes the access rights needed for the business datum that described database access request points to, the access right of described user terminal Limit is verified.
Such as, database broker node is provided previously by authority information according to database server, divides and has 5 authorities etc. Level, wherein, Permission Levels are reduced successively by 1 grade to 5 grade, and the i.e. 1 grade access rights with highest ranking, 5 grades have minimum Access rights;Upper 1 grade includes the access rights of lower 1 grade, the i.e. 1 grade all access rights including 2 grades, and 2 grades include 3 grades all Access rights, by that analogy.When receiving the database access request that user terminal sends, first authentication module 10 parses The ID that this database service request carries, and according to the ID stored and the mapping relations of access rights, determine Access rights corresponding to this ID are 2 grades, the access rights needed for the business datum that described database access request points to It is 3 grades, it is clear that, 2 grades of all access rights including 3 grades, i.e. the access authority verification of this user terminal is passed through.
Further, based on aforementioned any embodiment, it is proposed that the 5th embodiment of database broker node of the present invention, In the present embodiment, described database broker node, also include:
More new module, for updating the high load capacity time period information of each database server of storage.
It should be noted that the difference of the present embodiment and aforementioned any embodiment is, embodiment adds data The renewal operation of the high load capacity time period information of storehouse server, is the most only described this difference, before other can respectively refer to Stating each embodiment, here is omitted.
In embodiments of the present invention, it is provided that three kinds of modes updating high load capacity time period information:
One, more new module are when the renewal receiving the management personnel with default access instructs, according to receiving more New instruction updates the high load capacity time period information of corresponding database server;
Its two, more new module receive database server send high load capacity time period information time, by store right Should the high load capacity time period information updating of database server be the high load capacity time period information received;
Its three, the timing of more new module sends and updates request to each database server, and is receiving each database service During device high load capacity time period information based on the more newly requested return received, by the high load capacity time period of corresponding each data server Information is updated to the corresponding high load capacity time period information received respectively.
The present embodiment is by being updated the high load capacity time period information of each database server stored so that data Storehouse agent node can preferably provide agency service, promotes the stability of database server work further.
These are only the preferred embodiments of the present invention, not thereby limit the scope of the claims of the present invention, every utilize this Equivalent structure or equivalence flow process that bright description and accompanying drawing content are made convert, or are directly or indirectly used in other relevant skills Art neighborhood, is the most in like manner included in the scope of patent protection of the present invention.

Claims (10)

1. a data bank access method, it is characterised in that described data bank access method comprises the following steps:
When receiving the database access request that user terminal sends, database broker node please based on described database access The access rights to described user terminal are asked to verify;
Be verified and be currently located at database server corresponding to described database access request the high load capacity time period it Time interior, described database broker node obtains the business datum that the current described database access request stored points to, and will obtain The business datum taken sends to described user terminal;
Time outside the high load capacity time period being verified and being currently located at described database server, described database broker saves Described database access request is forwarded to described database server and performs by point, described database server return described number The business datum extremely described user terminal pointed to according to storehouse access request.
Data bank access method the most according to claim 1, it is characterised in that described database broker node is by acquisition Business datum sent before the step of described user terminal, also included:
When obtaining the business datum failure stored, described database broker node obtains also based on other database broker nodes Store the business datum that described database access request points to, and proceed to perform the business that described database broker node will obtain Data send the step to described user terminal.
Data bank access method the most according to claim 1, it is characterised in that described database broker node is based on described After the step that the access rights of described user terminal are verified by database access request, also include:
When authentication failed, described database broker node returns information to described user terminal.
4. according to the data bank access method described in any one of claim 1-3, it is characterised in that described database broker node The step verified the access rights of described user terminal based on described database access request includes:
Described database broker node obtains the ID that described database access request carries, and judges described ID Corresponding access rights, if include the access rights needed for the business datum that described database access request points to, if then It is verified.
5. according to the data bank access method described in any one of claim 1-3, it is characterised in that described database access side Method, also includes:
The high load capacity time period information of each database server that described database broker node updates stores.
6. a database broker node, it is characterised in that described database broker node includes:
Authentication module, for when receiving the database access request that user terminal sends, asks based on described database access The access rights to described user terminal are asked to verify;
Processing module, at the height being verified and being currently located at database server corresponding to described database access request Time within duration of load application section, obtain the business datum that the current described database access request stored points to, and the industry that will obtain Business data send to described user terminal;And,
Time outside the high load capacity time period being verified and being currently located at described database server, by described database access Request is forwarded to described database server and performs, described database server return what described database access request pointed to Business datum is to described user terminal.
Database broker node the most according to claim 6, it is characterised in that described processing module is additionally operable to, is obtaining During the business datum failure stored, obtain and store what described database access request pointed to based on other database broker nodes Business datum.
Database broker node the most according to claim 6, it is characterised in that described database broker node also includes:
Reminding module, for when authentication failed, returns information to described user terminal.
9. according to the database broker node described in any one of claim 6-8, it is characterised in that described authentication module is also used In, obtain the ID that described database access request carries, and whether judge access rights corresponding to described ID Including the access rights needed for the business datum that described database access request points to, if being then verified.
10. according to the database broker node described in any one of claim 6-8, it is characterised in that described database broker saves Point, also includes:
More new module, for updating the high load capacity time period information of each database server of storage.
CN201610303562.2A 2016-05-09 2016-05-09 Database access method and database agent node Pending CN106060004A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610303562.2A CN106060004A (en) 2016-05-09 2016-05-09 Database access method and database agent node

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610303562.2A CN106060004A (en) 2016-05-09 2016-05-09 Database access method and database agent node

Publications (1)

Publication Number Publication Date
CN106060004A true CN106060004A (en) 2016-10-26

Family

ID=57176196

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610303562.2A Pending CN106060004A (en) 2016-05-09 2016-05-09 Database access method and database agent node

Country Status (1)

Country Link
CN (1) CN106060004A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107426169A (en) * 2017-05-24 2017-12-01 阿里巴巴集团控股有限公司 A kind of method for processing business and device based on authority
CN107480555A (en) * 2017-08-01 2017-12-15 中国联合网络通信集团有限公司 Database-access rights control method and equipment based on block chain
CN108009239A (en) * 2017-11-29 2018-05-08 杭州有赞科技有限公司 Data bank access method and system
CN108259618A (en) * 2018-01-30 2018-07-06 北京泰尔英福网络科技有限责任公司 The data interactive processing method and device of a kind of synchronization
CN108768775A (en) * 2018-05-30 2018-11-06 努比亚技术有限公司 Information processing method, electronic equipment and computer storage media
CN110457944A (en) * 2019-08-02 2019-11-15 爱友智信息科技(苏州)有限公司 A kind of data sharing method and system
CN111177053A (en) * 2019-12-28 2020-05-19 山东英信计算机技术有限公司 Data communication method, device and system and computer readable storage medium
CN111309805A (en) * 2019-12-13 2020-06-19 华为技术有限公司 Data reading and writing method and device for database
CN112437080A (en) * 2020-11-20 2021-03-02 中国联合网络通信集团有限公司 Service authentication method and device
CN114257578A (en) * 2021-12-16 2022-03-29 上海幻电信息科技有限公司 Information verification method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222424A (en) * 2007-12-24 2008-07-16 中国电信股份有限公司 Content distribution network and scheduling method based on content in the network
CN101916298A (en) * 2010-08-31 2010-12-15 深圳市赫迪威信息技术有限公司 Database operation method, apparatus and system
CN102333130A (en) * 2011-10-31 2012-01-25 北京蓝汛通信技术有限责任公司 Method and system for accessing cache server and intelligent cache scheduler
CN103095691A (en) * 2012-12-31 2013-05-08 清华大学 Method of controlling access to Internet of things nodes
CN103139278A (en) * 2011-12-05 2013-06-05 北京网康科技有限公司 Network resource pre-fetching and cache accelerating method and device thereof
CN103457980A (en) * 2012-06-04 2013-12-18 联想(北京)有限公司 Terminal device and data acquisition method
CN105025042A (en) * 2014-04-16 2015-11-04 中国移动通信集团河北有限公司 Method of determining data information, system and proxy servers
CN105554143A (en) * 2015-12-25 2016-05-04 浪潮(北京)电子信息产业有限公司 High-availability cache server and data processing method and system thereof

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222424A (en) * 2007-12-24 2008-07-16 中国电信股份有限公司 Content distribution network and scheduling method based on content in the network
CN101916298A (en) * 2010-08-31 2010-12-15 深圳市赫迪威信息技术有限公司 Database operation method, apparatus and system
CN102333130A (en) * 2011-10-31 2012-01-25 北京蓝汛通信技术有限责任公司 Method and system for accessing cache server and intelligent cache scheduler
CN103139278A (en) * 2011-12-05 2013-06-05 北京网康科技有限公司 Network resource pre-fetching and cache accelerating method and device thereof
CN103457980A (en) * 2012-06-04 2013-12-18 联想(北京)有限公司 Terminal device and data acquisition method
CN103095691A (en) * 2012-12-31 2013-05-08 清华大学 Method of controlling access to Internet of things nodes
CN105025042A (en) * 2014-04-16 2015-11-04 中国移动通信集团河北有限公司 Method of determining data information, system and proxy servers
CN105554143A (en) * 2015-12-25 2016-05-04 浪潮(北京)电子信息产业有限公司 High-availability cache server and data processing method and system thereof

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107426169A (en) * 2017-05-24 2017-12-01 阿里巴巴集团控股有限公司 A kind of method for processing business and device based on authority
CN107480555A (en) * 2017-08-01 2017-12-15 中国联合网络通信集团有限公司 Database-access rights control method and equipment based on block chain
CN107480555B (en) * 2017-08-01 2020-03-13 中国联合网络通信集团有限公司 Database access authority control method and device based on block chain
CN108009239A (en) * 2017-11-29 2018-05-08 杭州有赞科技有限公司 Data bank access method and system
CN108259618B (en) * 2018-01-30 2021-07-27 中国信息通信研究院 Synchronous data interaction processing method and device
CN108259618A (en) * 2018-01-30 2018-07-06 北京泰尔英福网络科技有限责任公司 The data interactive processing method and device of a kind of synchronization
CN108768775A (en) * 2018-05-30 2018-11-06 努比亚技术有限公司 Information processing method, electronic equipment and computer storage media
CN108768775B (en) * 2018-05-30 2022-01-14 努比亚技术有限公司 Information processing method, electronic device, and computer storage medium
CN110457944A (en) * 2019-08-02 2019-11-15 爱友智信息科技(苏州)有限公司 A kind of data sharing method and system
CN110457944B (en) * 2019-08-02 2023-08-25 爱友智信息科技(苏州)有限公司 Data sharing method and system
CN111309805A (en) * 2019-12-13 2020-06-19 华为技术有限公司 Data reading and writing method and device for database
CN111309805B (en) * 2019-12-13 2023-10-20 华为技术有限公司 Data reading and writing method and device for database
US11868333B2 (en) 2019-12-13 2024-01-09 Huawei Technologies Co., Ltd. Data read/write method and apparatus for database
CN111177053B (en) * 2019-12-28 2022-02-18 山东英信计算机技术有限公司 Data communication method, device and system and computer readable storage medium
CN111177053A (en) * 2019-12-28 2020-05-19 山东英信计算机技术有限公司 Data communication method, device and system and computer readable storage medium
CN112437080A (en) * 2020-11-20 2021-03-02 中国联合网络通信集团有限公司 Service authentication method and device
CN114257578A (en) * 2021-12-16 2022-03-29 上海幻电信息科技有限公司 Information verification method and device
CN114257578B (en) * 2021-12-16 2024-04-02 上海幻电信息科技有限公司 Information verification method and device

Similar Documents

Publication Publication Date Title
CN106060004A (en) Database access method and database agent node
US10250526B2 (en) Method and apparatus for increasing subresource loading speed
CN102647482B (en) Method and system for accessing website
CN105207996B (en) Account merging method and device
CN101102313B (en) Network download system and method with automatically replaced proxy server
CN102449649B (en) Account-recovery technique
CN103139279B (en) file access method and system
CN104580074A (en) Logging method of client end application and corresponding server of logging method
CN103685590B (en) Obtain the method and system of IP address
CN106254451B (en) Embedded device web menu control system and method
US20090165100A1 (en) Web page safety judgment system
CN102752300B (en) Dynamic antitheft link system and dynamic antitheft link method
CN101997903A (en) Method and system for processing hypertext transfer protocol request
CN105072123B (en) A kind of single sign-on under cluster environment exits method and system
CN103051717A (en) Method, device and equipment for processing http request
CN105119973A (en) User information processing method and user information processing server
CN102752267A (en) Method and device for providing website information
KR102090982B1 (en) How to identify malicious websites, devices and computer storage media
CN101778013A (en) Website testing system and method
CN103428179A (en) Method, system and device for logging into multi-domain-name website
CN105743945A (en) Method and system for downloading files on the basis of switching download sources
JP2010273045A (en) Server apparatus
CN109819033A (en) A kind of resource file loading method and system
CN104618388A (en) Quick registration and login method and corresponding reset server and information server
CN103237089A (en) Method and device for repairing domain name system (DNS) polling mode-based webpages and server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 518057 Shenzhen Software Park, Nanshan District high tech Industrial Park, Guangdong, China,, 6 401-402

Applicant after: Yongxing Shenzhen Polytron Technologies Inc

Address before: 518057 Shenzhen Software Park, Nanshan District high tech Industrial Park, Guangdong, China,, 6 401-402

Applicant before: Shenzhen Longrise Technology Co., Ltd.

COR Change of bibliographic data
RJ01 Rejection of invention patent application after publication

Application publication date: 20161026

RJ01 Rejection of invention patent application after publication