WO2016107340A1 - 业务请求处理方法和装置 - Google Patents

业务请求处理方法和装置 Download PDF

Info

Publication number
WO2016107340A1
WO2016107340A1 PCT/CN2015/095545 CN2015095545W WO2016107340A1 WO 2016107340 A1 WO2016107340 A1 WO 2016107340A1 CN 2015095545 W CN2015095545 W CN 2015095545W WO 2016107340 A1 WO2016107340 A1 WO 2016107340A1
Authority
WO
WIPO (PCT)
Prior art keywords
service request
connection
database
idle
idle connection
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.)
Ceased
Application number
PCT/CN2015/095545
Other languages
English (en)
French (fr)
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.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Publication of WO2016107340A1 publication Critical patent/WO2016107340A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application

Definitions

  • the present invention relates to the field of data processing technologies, and in particular, to a service request processing method and apparatus.
  • the architecture in which the application is directly connected to the database is mainly adopted.
  • the database system of this architecture processes the service request, the application directly sends a service request to the database, and the database returns the corresponding response result to the application.
  • the database receives the service. After the request, there is no free connection available to the application, so a message that the service request failed is returned to the application. After receiving the message that the request failed, the application will send a service request to the database again, and if the database still has no free connection, it will return the message of the service request failure to the application again.
  • the application and the database repeat the above operations until an idle connection in the database is provided to the application for service request processing.
  • the present invention has been made in order to provide a service request processing method and apparatus that overcomes the above problems or at least partially solves the above problems.
  • a service request processing method includes: intercepting a service request sent by an application to a database; determining whether an idle connection with the database exists in a connection pool; if not, saving the service Requesting, and continuously determining, according to the setting rule, whether the idle connection with the database exists in the connection pool until the idle connection occurs in the connection pool; selecting the idle connection that occurs, and using the selected The idle connection sends the service request to the database.
  • a service request processing apparatus comprising: a first intercepting module configured to intercept a service request sent by the application device to the database device; and a determining module configured to determine the connection Whether there is an idle connection with the database device in the pool; the first execution module is configured to save the service request if the judgment result of the determining module is that there is no idle connection, and continue to determine the location according to the setting rule Whether the idle connection between the database device and the database device exists in the connection pool until the idle connection occurs in the connection pool; the sending module is configured to select the idle connection that appears, and use the selected An idle connection sends the service request to the database device.
  • a computer program comprising computer readable code, when the computer readable code is run on a computing device, causes the computing device to perform a service request processing method as described above.
  • a computer readable medium storing a computer program as described above is provided.
  • a database system especially a non-distributed database system, such as a relational database system
  • intercepting a service request sent by an application to a database selecting an idle connection with the database from the connection pool to send a service request, when the connection pool
  • the service request can be directly sent to the database through the idle connection.
  • the service request of the application is still accepted normally.
  • the idle connection occurs, the service request is sent to the database. Processed without returning an error or failure message to the app.
  • the application only needs to send a service request once, so that the service request can be processed by the database, which can prevent the user from receiving the message that the service request fails, resulting in a decrease in the user experience and avoidance of the application.
  • the service request is retransmitted, so that the operation terminal and the operation load of the network can be reduced, and the user experience can be improved.
  • the service request is sent to the database processing only when the database has an idle connection, and the database does not need to repeatedly determine whether there is an idle connection, and does not need to return a service request failure message to the application. Therefore, the operational burden of the database can be effectively reduced.
  • FIG. 1 is a schematic flow chart of steps of a service request processing method according to Embodiment 1 of the present invention.
  • FIG. 2 is a schematic flowchart of steps of a service request processing method according to Embodiment 2 of the present invention.
  • FIG. 3 is a schematic flowchart of steps of a service request processing method according to Embodiment 3 of the present invention.
  • FIG. 4 is a schematic structural diagram of a service request processing apparatus according to Embodiment 4 of the present invention.
  • FIG. 5 is a schematic structural diagram of a service request processing apparatus according to Embodiment 5 of the present invention.
  • Figure 6 is a block diagram showing the structure of a computing device for performing a service request processing method according to the present invention.
  • Fig. 7 schematically shows a storage unit for holding or carrying program code implementing a service request processing method according to the present invention.
  • FIG. 1 a flow chart of the steps of a service request processing method according to Embodiment 1 of the present invention is shown.
  • Step S102 intercept the service request sent by the application to the database.
  • the service request is any service request that the application can send to the database, for example, a request for obtaining a user number, a request for obtaining a remaining flow value of the package, and the like.
  • the service request sent by the application to the database may be intercepted by the middleware disposed between the application and the database, or may be intercepted by any other suitable device.
  • Step S104 Determine whether there is an idle connection with the database in the connection pool.
  • connection pool the database is connected according to the information of the supportable connections of the database.
  • the connection to the database in the connection pool is occupied by the service request, the current state of the connection is busy.
  • the connection to the database in the connection pool is not occupied by the service request, the current state of the connection is idle.
  • an idle connection with the database is selected from the connection pool to send the service request to the database.
  • Step S106 If there is no idle connection with the database in the connection pool, the service request is saved, and the idle connection with the database exists in the connection pool according to the setting rule until an idle connection occurs in the connection pool.
  • the service request can be stored in the processing queue, or can be stored in a preset cache, or any other suitable storage form.
  • connection pool for an idle connection to the database. For example, the status of each connection between the database and the database in the connection pool is polled every set time interval to determine whether there is an idle connection.
  • Step S108 Select the idle connection that appears and send the service request to the database using the selected idle connection.
  • the idle connection is selected to send the service request to the database, and the service request can be guaranteed to be processed due to the existence of an idle connection in the database.
  • the service request processing method provided by the embodiment of the present invention intercepts a service request sent by an application to a database in a database system, especially a non-distributed database system, such as a relational database system, and selects an idle connection with the database from the connection pool.
  • a service request sent by an application to a database in a database system, especially a non-distributed database system, such as a relational database system, and selects an idle connection with the database from the connection pool.
  • Sending to the service request when there is an idle connection in the connection pool, the service request can be directly sent to the database through the idle connection.
  • the service request of the application is still accepted normally, and the service is about to be available when the idle connection occurs.
  • the request is sent to the database for processing without returning an error or failure message to the application.
  • the application only needs to send the service request once, so that the service request can be processed by the database, which can prevent the user from receiving the message that the service request fails, resulting in a decrease in the use experience, and can prevent the application from repeatedly sending the service request, thereby reducing the application.
  • the operational burden of the terminal and the network can enhance the user experience.
  • the service request is sent to the database processing only when there is an idle connection in the database, and the database does not need to repeatedly judge whether there is an idle connection, and does not need to return a message that the service request fails to the application. Therefore, the operation burden of the database can be effectively reduced.
  • FIG. 2 a flow chart of the steps of a service request processing method according to Embodiment 2 of the present invention is shown.
  • Step S202 The middleware intercepts the service request sent by the application to the database.
  • the middleware intercepts the service request sent by the application to the database, and the middleware is disposed between the application and the database.
  • the so-called between is not in the physical sense, and Because the middleware intercepts the data sent between the application and the database, it is called the middleware between the application and the database.
  • the application, the middleware, and the database may be set on the same device, or may be set on one device, or may be set on different devices in combination.
  • a middleware can be set between multiple applications and a database to set up a middleware for each database.
  • One middleware can be set between multiple applications and multiple databases to set up a middleware for multiple databases.
  • the service request is any service request that the application can send to the database, for example, a request for obtaining a user number, a request for obtaining a remaining flow value of the package, and the like.
  • Step S204 The middleware determines whether there is an idle connection between the middleware and the database in the connection pool of the self. If yes, step S206 is performed. If not, step S208 is performed.
  • the middleware's own connection pool is provided with a connection between the middleware and the database, the number of which is the same as the number of connections that the database can support.
  • the data stored in each database is also the same.
  • Step S206 If the middleware determines that there is an idle connection between the middleware and the database in its connection pool, then select an idle connection, and then execute step S210.
  • the specific selection method for selecting an idle connection is not specifically limited in this embodiment.
  • the middleware may randomly select an idle connection from it, or select a connection with the longest idle time according to the length of the connection idle time. Of course, you can also choose according to other options.
  • Step S208 If the middleware determines that there is no idle connection between the middleware and the database in the connection pool, the service request is saved, and the connection pool is continuously determined according to the setting rule whether there is idleness between the middleware and the database. Connect until an idle connection occurs in the connection pool, select the idle connection that appears, and then perform step S210.
  • the service request can be stored in the processing queue, or can be stored in a preset cache, or any other suitable storage form.
  • a person skilled in the art can set a specific rule for continuously determining whether there is an idle connection between the middleware and the database in the connection pool according to actual requirements. For example: every The status of each connection between the database and the database in the connection pool is polled at a set time interval to determine whether there is an idle connection.
  • Step S210 The middleware sends the service request to the database using the selected idle connection.
  • the middleware selects the idle connection to send the service request to the database, and the existence of the idle connection in the database can ensure that the service request is processed.
  • Step S212 The middleware intercepts the response result of the service request returned by the selected idle connection to the application, and sends the intercepted response result to the application that sends the service request.
  • the response result is returned to the application by the connection that sends the service request.
  • the middleware intercepts the response result of the service request returned by the database.
  • the middleware how to determine the application corresponding to the response result may be set by a person skilled in the art according to the actual situation.
  • the service request sent by the middleware to the database may carry the identification information of the application that sends the service request, and the database returns a response.
  • the identification information of the application is also carried in the response result.
  • the middleware intercepts the response result, the corresponding application may be determined according to the identification information of the application in the response result.
  • a non-distributed database system such as a relational database system
  • a relational database system mainly adopts an architecture in which an application is directly connected to a database, and the database cannot respond to a service request exceeding a maximum number of connections.
  • the middleware located between the application and the database is set, and the middleware intercepts the service request sent by the application to the database,
  • the idle connection between the middleware and the database is selected from the connection pool of the middleware itself to be sent to the service request.
  • the service request can be directly sent to the database through the idle connection, in the middleware.
  • the service request of the application When there is no idle connection, the service request of the application is still normally accepted. When the idle connection occurs, the service request is sent to the database for processing, and no error or failure message is returned to the application. It can be seen that the application only needs to send the service request once, so that the service request can be processed by the database, which can prevent the user from receiving the message that the service request fails, resulting in a decrease in the use experience, and can prevent the application from repeatedly sending the service request, thereby reducing the application.
  • the operational burden of the terminal and the network can enhance the user experience.
  • the middleware is only in the database When there is an idle connection, the service request is sent to the database for processing. The database does not need to repeatedly determine whether there is an idle connection, and does not need to return a message that the service request fails to the application. Therefore, the operation burden of the database can be effectively reduced.
  • FIG. 3 a flow chart of the steps of a service processing method according to Embodiment 3 of the present invention is shown.
  • Step S302 The middleware generates a connection pool according to the information of the connection that the database can support.
  • connection pools are used to manage the connections that the database can support.
  • the middleware generates an optional generation method of the connection pool according to the information that the database can support.
  • the middleware determines the upper limit of the connection that the database can support according to the information that the database can support; sets the same quantity in the connection pool. Connection. For example, if the database can support a maximum of 50 connections, then the middleware establishes 50 connections in the connection pool.
  • the service processing method in the embodiment of the present invention can be applied to various database systems.
  • the service request processing method in the embodiment of the present invention is applied to a non-distributed database system, and more preferably, to a relational database system. Since the current non-distributed database system, such as the relational database system, processes the service request, the application directly sends a service request to the database, and the database directly responds or rejects the service request sent by the application, and the service request processing method is processed by the database. When the number of service requests reaches the upper limit that the database can support, the database will directly return the message that the service request fails to the application, which affects the user experience.
  • the service request processing method in the embodiment of the present invention is applied to a relational database, and a middleware is set between the application and the database, and the middleware is used to cache a service request that the database cannot process immediately, and the idle connection can be processed in the database.
  • the service requests the business request is sent to the database without returning an error or failure message to the application, which can effectively solve the problem affecting the user experience.
  • Step S304 The middleware intercepts the service request sent by the application to the database, and returns to the application. The message that the business request was accepted.
  • the message that the middleware returns the service request to the application is an optional operation.
  • the middleware may also be configured to intercept the service request sent by the application to the database, but the service request is not returned to the application. Accepted news.
  • the application can confirm that the current service request has been successfully accepted, and avoid the application continuously sending the inquiry message to the database or the middleware, thereby reducing the operation burden of the application and the information interaction burden of the network.
  • Step S306 The middleware determines whether there is an idle connection between the middleware and the database in the connection pool of the self. If yes, step S308 is performed. If not, step S310 is performed.
  • a preferred middleware determines whether an idle connection between the connection pool and the database is stored as follows:
  • the middleware determines whether there is an idle connection with the database in the connection pool according to the connection state of each connection in the connection pool; when there is a connection whose connection state is idle, it determines that there is an idle connection between the connection pool and the database; When all connections are in a busy state, it is determined that there is no free connection to the database in the connection pool.
  • the middleware can determine that there is an idle connection between the connection pool and the database when it is judged that the response result returned by the database is intercepted.
  • Step S308 If the middleware determines that there is an idle connection in the connection pool, then select an idle connection, and then execute step S312.
  • Step S310 If the middleware determines that there is no idle connection in its connection pool, the middleware saves the service request, and returns to step S306.
  • the middleware stores the business request in the pending queue, or stores the business request in a preset cache.
  • the middleware determines that there is no idle connection in the connection pool, it returns to step S306 to continuously determine whether there is an idle connection with the database in the connection pool according to the set rule, until an idle connection occurs in the connection pool, and the selected one appears. Idle connection.
  • the setting rules may be set to include but are not limited to the following rules:
  • the middleware determines whether there is an idle connection with the database in the connection pool according to the set time interval.
  • the setting of the time interval may be set by a person skilled in the art according to actual needs, for example, setting to poll the connection in the connection pool again after polling the connection between the database and the database in 1 second. .
  • the middleware determines in real time whether there is an idle connection with the database in the connection pool.
  • step S306 it is determined whether there is an idle connection with the database in the connection pool, and when an idle connection occurs in the connection pool, any preferred manner described in step S306 may be selected.
  • Step S312 The middleware changes the connection state of the selected idle connection from idle to busy, and sends a service request to the database using the selected idle connection.
  • the middleware can efficiently and quickly determine the current state of each connection in the connection pool, thereby more effectively selecting an idle connection for the service request.
  • the middleware When the middleware sends a service request to the database using the selected idle connection, the service request is sent according to the location of the service request in the queue or the priority of the service request, specifically:
  • the service request is sequentially taken out from the queue to be processed, and an idle connection is allocated for the extracted service request, and the service request is sent to the database by using the allocated idle connection.
  • the service request is sequentially taken according to the priority of the service request, and an idle connection is allocated for the extracted service request, and the service request is sent to the database by using the allocated idle connection.
  • the service request saved in step S310 is located in the first bit of the queue to be processed or has the highest priority in the preset cache, then when the idle connection is selected, the service request can be directly sent to database. If the service request is not located in the first bit of the pending queue or is not the highest priority service request, it needs to wait until the service request in the pending queue before the service request, or the priority is higher than the service request. After the priority business request is sent to the database, the idle connection can be selected to send the service request to the database.
  • Step S314 The middleware intercepts the result of the response to the service request returned by the database to the application through the selected idle connection.
  • the database receives the service request, and after processing the service request, returns a response result to the service request to the application through the idle connection selected by the middleware. At this point, the middleware intercepts the response.
  • Step S316 The middleware changes the connection state of the connection returning the response result from busy to idle according to the intercepted response result, and the middleware sends the intercepted response result to the application that sends the service request.
  • the middleware when the middleware intercepts the response result returned by a connection, the connection state of the connection is changed from busy to idle, so that the middleware allocates a connection for the service request that has not been processed, thereby improving the connection usage rate.
  • the middleware will send the intercepted response to the application that sent the service request.
  • modification of the connection state and the sending of the response result to the application may be performed in parallel at the same time, or may be performed in any order.
  • a middleware located between an application and a database is set, and the middleware intercepts a service request sent by the application to the database,
  • the idle connection between the connection pool and the database is selected to be sent to the service request.
  • the service request can be directly sent to the database through the idle connection.
  • the service request of the application is still normally accepted, and the service request is sent to the database for processing when an idle connection occurs, and no error or failure message is returned to the application.
  • the application only needs to send the service request once, so that the service request can be processed by the database, which can prevent the user from receiving the message that the service request fails, resulting in a decrease in the use experience, and can prevent the application from repeatedly sending the service request, thereby reducing the application.
  • the operational burden of the terminal and the network can enhance the user experience.
  • the middleware only sends the service request to the database when the database has an idle connection. The database does not need to repeatedly judge whether there is an idle connection in the connection pool, and does not need to return a service request failure message to the application. Therefore, the database can be effectively reduced. Workload.
  • FIG. 4 a schematic structural diagram of a service request processing apparatus according to Embodiment 4 of the present invention is shown.
  • the service request processing device of the present invention may be disposed between the application device and the database device.
  • the service request processing device includes: a first intercepting module 402 configured to intercept a service request sent by the application device to the database device; and a determining module 404 configured to Determining whether there is an idle connection with the database device in the connection pool; the first execution module 406 is configured to save the service request if the judgment result of the determination module is that there is no idle connection, and continuously determine the connection pool according to the setting rule Whether there is an idle connection with the database device until an idle connection occurs in the connection pool; the sending module 408 is configured to select the idle connection that appears and send the service request to the database device using the selected idle connection.
  • the service request processing device, the application device, and the database device may be disposed in the same device, or may be respectively disposed in different devices. This embodiment of the present invention does not specifically limit this.
  • the service request processing apparatus can intercept a service request sent by an application device to a database device in a database system, especially a non-distributed database system, such as a relational database system, and select between the connection pool and the database device.
  • the idle connection is sent to the service request.
  • the service request can be directly sent to the database device through the idle connection.
  • the service request of the application is still accepted normally, and the idle connection is about to occur.
  • the business request is sent to the database for processing without returning an error or failure message to the application.
  • the application device only needs to send the service request once, so that the service request can be processed by the database, which can prevent the user from receiving the message that the service request fails, resulting in a decrease in the use experience, and can prevent the application from repeatedly sending the service request, thereby reducing the service request.
  • the operational burden of the terminal and the network of the application can enhance the user experience.
  • the service request processing apparatus of the embodiment of the present invention only sends a service request to the database device for processing when the database device has an idle connection, and the database device does not need to repeatedly determine whether there is an idle connection, and does not need to return a service request failure message to the application. Therefore, the operational burden of the database device can be effectively reduced.
  • FIG. 5 a schematic structural diagram of a service request processing apparatus according to Embodiment 5 of the present invention is shown.
  • the embodiment of the present invention further optimizes the service request processing apparatus in the fourth embodiment.
  • the optimized service request processing apparatus includes: a first intercepting module 502 configured to intercept a service request sent by the application apparatus to the database apparatus; and a determining module 504 Configuring to determine whether there is an idle connection with the database device in the connection pool; the first execution module 506 is configured to save the service if the judgment result of the determination module is that there is no idle connection, and continue according to the setting rule. Determining whether there is an idle connection with the database device in the connection pool until an idle connection occurs in the connection pool, selecting an idle connection that occurs; the sending module 508 is configured to select the idle connection that appears, and use the selected idle connection to make the service request Send to the database device.
  • the service request processing apparatus of the embodiment of the present invention further includes: a second execution module 510 configured to select an idle connection and use if the judgment result of the determination module 504 is that there is an idle connection with the database in the connection pool.
  • the selected idle connection sends a business request to the database.
  • the service request processing apparatus of the embodiment of the present invention further includes: a second intercepting module 512 configured to intercept a response of the database device to the application device returned by the selected idle connection, and the intercepted response The result is sent to the application device that sent the service request.
  • a second intercepting module 512 configured to intercept a response of the database device to the application device returned by the selected idle connection, and the intercepted response The result is sent to the application device that sent the service request.
  • the service request processing apparatus of this embodiment further includes: a connection pool generation module 514 configured to: according to the connection information that the database apparatus can support, before the first interception module 502 intercepts the service request sent by the application apparatus to the database apparatus, A connection pool is generated, where the connection pool is used to manage connections that the database appliance can support.
  • a connection pool generation module 514 configured to: according to the connection information that the database apparatus can support, before the first interception module 502 intercepts the service request sent by the application apparatus to the database apparatus, A connection pool is generated, where the connection pool is used to manage connections that the database appliance can support.
  • the first intercepting module 502 is configured to intercept a service request sent by the application device to the database device, and return a message that the service request is accepted to the application device.
  • the determining module 504 includes: a state determining module 5042 configured to determine, according to the connection state of each connection in the connection pool of the middleware device itself, whether there is a middle device between the middleware device and the database device in the connection pool of the middleware device itself Idle connection; determination module 5044, configuration When the determination result of the state judging module 5042 is that there is a connection whose connection state is idle, it is determined that there is an idle connection between the connection pool and the database device; when the judgment result of the state judging module 5042 is that all the connected states are busy , to determine that there is no idle connection between the connection device and the database device.
  • the sending module 508 is configured to change the connection state of the selected idle connection from idle to busy, and send the service request to the database device by using the selected idle connection.
  • the service request processing device of the embodiment of the present invention further includes: The state change module 516 is configured to, after the second interception module 512 intercepts the response result of the service request returned by the database device to the application device through the selected idle connection, and according to the intercepted response result, connect the connection of the response result. The status changes from busy to idle.
  • the first execution module 506 continuously determines, according to the setting rule, whether there is an idle connection with the database device in the connection pool: when it is determined that the response result returned by the database device is intercepted, determining that the connection pool exists and the database device Idle connection between.
  • the first execution module 506 continuously determines, according to the setting rule, whether there is an idle connection with the database device in the connection pool: determining whether there is an idle connection with the database device in the connection pool according to the set time interval; or In real time, it is determined whether there is an idle connection with the database device in the connection pool.
  • the service request is placed in the queue to be processed; or the service request is stored in the preset cache.
  • the sending module 508 sends the service request to the database device by using the selected idle connection: when the service request is stored in the queue to be processed, the service request is sequentially taken out from the queue to be processed, and an idle connection is allocated for the extracted service request.
  • the service request is sent to the database device by using the allocated idle connection; when the service request is stored in the preset cache, the service request is sequentially taken according to the priority of the service request, and the idle connection is allocated for the extracted service request, and the allocated idle connection is used.
  • the service request processing apparatus of the embodiment of the present invention is applied to a non-distributed database system.
  • the service request processing apparatus of the embodiment of the present invention is applied to a relational database system. System.
  • the service request processing device of the embodiment of the present invention is a middleware device, the middleware device is disposed between the application device and the database, the middleware device is provided with its own connection pool, and the middleware is intercepted to the application device to the database.
  • the service request sent by the device it is determined whether there is an idle connection between the middleware and the database device in the connection pool of the middleware device itself; when it is determined that there is an idle connection between the middleware and the database device, an idle connection is selected, A service request is sent to the database using the selected idle connection.
  • the intercepted service request is saved, and the idle connection between the middleware and the database device is continuously determined in the connection pool according to the setting rule. Until an idle connection occurs in the connection pool, select the idle connection that appears and send the service request to the database device using the selected idle connection.
  • the service request processing apparatus of the embodiment of the present invention is used to implement the corresponding service request processing method in the foregoing Embodiment 1, the second embodiment, and the third embodiment, and has the beneficial effects of the corresponding method embodiments, and details are not described herein again.
  • the service request processing scheme provided herein is not inherently related to any particular computer, virtual system, or other device.
  • Various general purpose systems can also be used with the teaching based on the teachings herein. According to the above description, it is obvious that the structure required to construct the system having the solution of the present invention is obvious.
  • the invention is not directed to any particular programming language. It is to be understood that the invention may be embodied in a variety of programming language, and the description of the specific language has been described above in order to disclose the preferred embodiments of the invention.
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
  • Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components of the service request processing scheme in accordance with embodiments of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • FIG. 6 shows a computing device that can implement the service request processing method according to the present invention.
  • the computing device conventionally includes a processor 610 and a computer program product or computer readable medium in the form of a memory 620.
  • the memory 620 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM.
  • Memory 620 has a storage space 630 that stores program code 631 for performing any of the method steps described above.
  • storage space 630 storing program code may include respective program code 631 for implementing various steps in the above methods, respectively.
  • the program code can be read from or written to one or more computer program products.
  • Such computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks.
  • Such a computer program product is typically a portable or fixed storage unit such as that shown in FIG.
  • the storage unit may have storage segments, storage spaces, and the like that are similarly arranged to memory 620 in the computing device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit includes computer readable code 631', ie, code that can be read by a processor, such as 610, that when executed by a computing device causes the computing device to perform various steps in the methods described above .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明提供了一种业务请求处理方法和装置,其中,所述方法包括:拦截应用向数据库发送的业务请求;判断连接池中是否存在与所述数据库的空闲连接;若不存在,则保存所述业务请求,并按照设定规则持续判断所述连接池中是否存在所述与所述数据库的空闲连接,直至所述连接池中出现所述空闲连接;选择出现的所述空闲连接,并使用选择的所述空闲连接将所述业务请求发送至数据库。通过本发明,应用只需发送一次业务请求,即可保证业务请求被数据库处理,既能够避免用户接收到业务请求失败的消息导致使用体验降低,又能够避免应用重复发送业务请求,因此,既能够降低应用所在终端以及网络的操作负担又能够提升用户的使用体验。

Description

业务请求处理方法和装置 技术领域
本发明涉及数据处理技术领域,特别是涉及一种业务请求处理方法和装置。
背景技术
目前,在关系型数据库系统以及非分布式数据库系统中主要采用应用与数据库直连的架构。这种架构的数据库系统在处理业务请求时,应用直接向数据库发送业务请求,数据库返回相应的响应结果至应用。
采用现有的这种业务请求处理方案,当数据库当前处理的业务请求数量达到数据库可支持的上限(数据库的连接数达到上限),在有新的应用向数据库发送业务请求时,数据库接收到业务请求后由于没有空闲的连接可提供给该应用,因此,会返回业务请求失败的消息至该应用。而该应用在接收到请求失败的消息后,会再次向数据库发送业务请求,而如果数据库仍没有空闲的连接则会再次返回业务请求失败的消息至该应用。该应用以及数据库会重复上述操作,直至数据库中出现空闲的连接提供给该应用进行业务请求处理。
可见,现有的这种业务请求处理方案,当数据库当前处理的业务请求数量达到数据库可支持的上限,在有新的应用向数据库发送业务请求时,一方面,由于数据库直接向该应用返回业务请求失败的消息,因此,会影响用户的使用体验。同时,使用该应用需要重复发送业务请求直至请求成功,在影响用户的使用体验的同时也会增加应用所在终端以及网络的操作负担。另一方面,由于数据库要重复多次判断是否存在空闲连接以及向应用返回业务请求失败的消息,同样也会增加数据库的操作负担。
发明内容
鉴于上述现有的问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的业务请求处理方法和装置。
依据本发明的一个方面,提供了一种业务请求处理方法,包括:拦截应用向数据库发送的业务请求;判断连接池中是否存在与所述数据库的空闲连接;若不存在,则保存所述业务请求,并按照设定规则持续判断所述连接池中是否存在所述与所述数据库的空闲连接,直至所述连接池中出现所述空闲连接;选择出现的所述空闲连接,并使用选择的所述空闲连接将所述业务请求发送至所述数据库。
根据本发明的另一方面,提供了一种业务请求处理装置,所述业务请求处理装置包括:第一拦截模块,配置为拦截应用装置向数据库装置发送的业务请求;判断模块,配置为判断连接池中是否存在与数据库装置之间的空闲连接;第一执行模块,配置为若所述判断模块的判断结果为不存在空闲连接时,则保存所述业务请求,并按照设定规则持续判断所述连接池中是否存在所述与所述数据库装置之间的空闲连接,直至所述连接池中出现所述空闲连接;发送模块,配置为选择出现的所述空闲连接,并使用选择的所述空闲连接将所述业务请求发送至所述数据库装置。
根据本发明的又一方面提供了一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行如上文所述的业务请求处理方法。
根据本发明的再一方面提供了一种计算机可读介质,其中存储了如上文所述的计算机程序。
本发明的有益效果为:
通过本发明,在数据库系统尤其是非分布式数据库系统如关系型数据库系统中,拦截应用向数据库发送的业务请求,从连接池中选择与数据库之间的空闲连接来发送给业务请求,当连接池中存在空闲连接时,则可直接将业务请求通过空闲连接发送至数据库,当连接池中不存在空闲连接时,仍然正常接受应用的业务请求,待出现空闲连接时即将该业务请求发送至数据库进行处理,而不会向应用返回错误或失败消息。可见,应用只需发送一次业务请求,即可保证业务请求被数据库处理,既能够避免用户接收到业务请求失败的消息导致用户的使用体验降低,又能够避免应用重 复发送业务请求,因此,既能够降低应用所在终端以及网络的操作负担又能够提升用户的使用体验。此外,本发明中公开的业务信息处理方案中,仅是在数据库存在空闲连接时将业务请求发送至数据库处理,数据库无需重复判断自身是否存在空闲连接更不需要向应用返回业务请求失败的消息,因此,能够有效降低数据库的操作负担。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1是根据本发明实施例一的一种业务请求处理方法的步骤流程示意图;
图2是根据本发明实施例二的一种业务请求处理方法的步骤流程示意图;
图3是根据本发明实施例三的一种业务请求处理方法的步骤流程示意图;
图4是根据本发明实施例四的一种业务请求处理装置的结构示意图;
图5是根据本发明实施例五的一种业务请求处理装置的结构示意图;
图6示意性地示出了用于执行根据本发明的业务请求处理方法的计算设备的结构框图;以及
图7示意性地示出了用于保持或者携带实现根据本发明的业务请求处理方法的程序代码的存储单元。
具体实施方式
下面将参照附图更详细地描述本发明公开的示例性实施例。虽然附图中显示了本发明公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本发明公开的范围完整的传达给本领域的技术人员。
实施例一
参照图1,示出了本发明实施例一的一种业务请求处理方法的步骤流程示意图。
本发明实施例的业务请求处理方法包括以下步骤:
步骤S102:拦截应用向数据库发送的业务请求。
其中,业务请求为应用可以向数据库发送的任意业务请求,例如:请求获取某用户号码的请求、获取套餐剩余流量值的请求等。
需要说明的是,本实施例中可以由设置在应用和数据库之间的中间件来拦截应用向数据库发送的业务请求,也可以由其他任意适当的装置来拦截。
步骤S104:判断连接池中是否存在与数据库的空闲连接。
在连接池中依据数据库的可支持的连接的信息,为数据库建立相应地连接。当连接池中与数据库的连接被业务请求占用时,则连接的当前状态为忙碌,当连接池中与数据库的连接未被业务请求占用时,则连接的当前状态为空闲。在拦截到业务请求后,从连接池中选择一个与数据库的空闲连接来向数据库发送该业务请求。
步骤S106:若连接池中不存在与数据库的空闲连接,则保存业务请求,并按照设定规则持续判断连接池中是否存在与数据库的空闲连接,直至连接池中出现空闲连接。
需要说明的是,业务请求可以存放入处理队列中,也可以存放入预设的缓存中,或者采用其它任意适当的存放形式。
在实际实现过程中,本领域技术人员可以根据实际需求设置持续判断 连接池中是否存在与数据库之间的空闲连接的具体规则。例如:每隔设定的时间间隔轮询连接池中的与数据库之间的各连接的状态,以判断是否存在空闲连接。
步骤S108:选择出现的空闲连接,并使用选择的空闲连接将业务请求发送至数据库。
选择空闲连接将业务请求发送至数据库,数据库中由于存在空闲连接因此能够保证该业务请求被处理。
通过本发明实施例提供的业务请求处理方法,在数据库系统尤其是非分布式数据库系统如关系型数据库系统中,拦截应用向数据库发送的业务请求,从连接池中选择与数据库之间的空闲连接来发送给业务请求,当连接池中存在空闲连接时,则可直接将业务请求通过空闲连接发送至数据库,当不存在空闲连接时,仍正常接受应用的业务请求,待出现空闲连接时即将该业务请求发送至数据库进行处理,而不会向应用返回错误或者失败消息。可见,应用只需发送一次业务请求,即可保证业务请求被数据库处理,既能够避免用户接收到业务请求失败的消息导致使用体验降低,又能够避免应用重复发送业务请求,因此,既能够降低应用所在终端以及网络的操作负担又能够提升用户的使用体验。此外,仅是在数据库存在空闲连接时将业务请求发送至数据库处理,数据库无需重复判断自身是否存在空闲连接更不需要向应用返回业务请求失败的消息,因此,能够有效降低数据库的操作负担。
实施例二
参照图2,示出了本发明实施例二的一种业务请求处理方法的步骤流程示意图。
本发明实施例的业务请求处理方法包括以下步骤:
步骤S202:中间件拦截应用向数据库发送的业务请求。
其中,本实施例中由中间件来拦截应用向数据库发送的业务请求,中间件设置于应用和数据库之间。所谓的之间并非是物理意义上的之间,而 是由于中间件拦截应用与数据库之间发送的数据,因此,才称其为设置于应用和数据库之间中间件。
需要说明的是,应用、中间件以及数据库可以设置在同一台设备上,也可以各自设置在一台设备上,或者两两组合设置在不同的设备上。一个中间件可以设置于多个应用和一个数据库之间即为每个数据库设置一个中间件,一个中间件可以设置于多个应用和多个数据库之间即为多个数据库设置一个中间件。
其中,业务请求为应用可以向数据库发送的任意业务请求,例如:请求获取某用户号码的请求、获取套餐剩余流量值的请求等。
步骤S204:中间件判断自身的连接池中是否存在中间件与数据库之间的空闲连接,若存在,则执行步骤S206,若不存在,则执行步骤S208。
其中,中间件自身的连接池中设置有中间件与数据库之间的连接,其数量与数据库可支持的连接的数量相同。另外,当存在多个数据库时,各个数据库中存储的数据也相同。
步骤S206:若中间件判断自身的连接池中存在中间件与数据库之间的空闲连接时,则选择一个空闲连接,然后,执行步骤S210。
对于选择一个空闲连接的具体选择方式本实施例不作具体限制,当存在多个空闲连接时,中间件可以随机从中选择一个空闲连接,也可以按照连接空闲时间的长短选择一个空闲时间最长的连接,当然还可以按照其他的选择方式进行选择。
步骤S208:若中间件判断自身的连接池中不存在中间件与数据库之间的空闲连接时,则保存业务请求,并按照设定规则持续判断连接池中是否存在中间件与数据库之间的空闲连接,直至连接池中出现空闲连接,选择出现的空闲连接,然后,执行步骤S210。
需要说明的是,业务请求可以存放入处理队列中,也可以存放入预设的缓存中,或者采用其它任意适当的存放形式。
在实际实现过程中,本领域技术人员可以根据实际需求设置持续判断连接池中是否存在中间件与数据库之间的空闲连接的具体规则。例如:每 隔设定的时间间隔轮询连接池中的与数据库之间的各连接的状态,以判断是否存在空闲连接。
步骤S210:中间件使用选择的空闲连接将业务请求发送至数据库。
中间件选择空闲连接将业务请求发送至数据库,数据库中由于存在空闲连接因此能够保证该业务请求被处理。
步骤S212:中间件拦截数据库通过选择的空闲连接向应用返回的、对业务请求的响应结果,并将拦截到的响应结果发送至发送业务请求的应用。
数据库处理完业务请求后,通过发送业务请求的连接将响应结果返回至应用,此时,中间件拦截所述数据库返回的、对业务请求的响应结果。
对于中间件如何确定响应结果对应的应用,可以由本领域技术人员根据实际情况进行设置,例如:可以在中间件发送至数据库的业务请求中携带发送该业务请求的应用的标识信息,数据库在返回响应结果时,在响应结果中也携带有应用的标识信息,当中间件拦截到响应结果时,则可根据响应结果中的应用的标识信息来确定对应的应用。
相关技术中,在非分布式数据库系统如关系型数据库系统中主要采用应用与数据库直连的架构,导致数据库无法响应超过其连接数量上限的业务请求。而通过本实施例提供的业务请求处理方法,在数据库系统尤其是非分布式数据库系统如关系型数据库系统中,设置位于应用和数据库之间的中间件,中间件拦截应用向数据库发送的业务请求,从中间件自身的连接池中选择中间件与数据库之间的空闲连接来发送给业务请求,当中间件中存在空闲连接时,则可直接将业务请求通过空闲连接发送至数据库,当中间件中不存在空闲连接时,仍正常接受应用的业务请求,待出现空闲连接时即将该业务请求发送至数据库进行处理,而不会向应用返回错误或者失败消息。可见,应用只需发送一次业务请求,即可保证业务请求被数据库处理,既能够避免用户接收到业务请求失败的消息导致使用体验降低,又能够避免应用重复发送业务请求,因此,既能够降低应用所在终端以及网络的操作负担又能够提升用户的使用体验。此外,中间件仅是在数据库 存在空闲连接时将业务请求发送至数据库处理,数据库无需重复判断自身是否存在空闲连接更不需要向应用返回业务请求失败的消息,因此,能够有效降低数据库的操作负担。
实施例三
参照图3,示出了本发明实施例三的一种业务处理方法的步骤流程示意图。
本发明实施例的业务处理方法具体包括以下步骤:
步骤S302:中间件根据数据库可支持的连接的信息,生成连接池。
其中,中间件设置于应用和数据库之间。连接池用于管理数据库可支持的连接。
中间件根据数据库可支持的连接的信息,生成连接池的一种可选的生成方式如下:中间件根据数据库可支持的连接的信息确定数据库可支持的连接上限;在连接池中设置相同的数量的连接。例如:数据库可支持的连接上限为50个连接,那么,中间件在连接池中建立50个连接。
本发明实施例中的业务处理方法可以应用于多种数据库系统,优选地,将本发明实施例中的业务请求处理方法应用于非分布式数据库系统,更优选地,应用于关系型数据库系统。由于目前非分布式数据库系统如关系型数据库系统在处理业务请求时,均是应用直接向数据库发送业务请求,数据库直接响应或者拒绝应用发送的业务请求,而这样业务请求处理方法,当数据库当前处理的业务请求数量达到数据库可支持的上限时,数据库会直接向应用返回业务请求失败的消息,影响用户的使用体验。所以,将本发明实施例中的业务请求处理方法应用于关系型数据库,在应用和数据库之间设置中间件,由中间件来缓存数据库无法马上处理的业务请求,待数据库存在空闲连接能够处理该业务请求时再将业务请求发送至数据库,而不会向应用返回错误或失败消息,能够有效解决影响用户体验的问题。
步骤S304:中间件拦截应用向数据库发送的业务请求,并向应用返回 业务请求被接受的消息。
需要说明的是,中间件向应用返回业务请求被接受的消息为可选操作,在实际实现过程中,还可以设置成中间件拦截应用向数据库发送的业务请求,但不向应用返回业务请求被接受的消息。通过向应用返回业务请求被接受的消息,使得应用能够确认本次的业务请求已被成功受理,避免应用不断向数据库或中间件发送询问消息,减少应用的操作负担以及网络的信息交互负担。
步骤S306:中间件判断自身的连接池中是否存在中间件与数据库之间的空闲连接,若存在,则执行步骤S308,若不存在,则执行步骤S310。
一种优选的中间件判断连接池中是否存与数据库之间的空闲连接的方式如下:
中间件根据连接池中各连接的连接状态,判断连接池中是否存在与数据库之间的空闲连接;当存在连接状态为空闲的连接时,确定连接池中存在与数据库之间的空闲连接;当所有连接的状态均为忙碌时,确定连接池中不存在与数据库之间的空闲连接。
另一种中间件判断连接池中是否存在与数据库之间的空闲连接的方式如下:中间件可以在判断拦截到数据库返回的响应结果时,则确定连接池中存在与数据库之间的空闲连接。
步骤S308:若中间件判断连接池中存在空闲连接,则选择一个空闲连接,然后,执行步骤S312。
步骤S310:若中间件判断自身的连接池中不存在空闲连接,中间件保存业务请求,并则返回步骤S306。
例如,中间件将业务请求存放入待处理队列,或者,将业务请求存放入预设的缓存。
也即,若中间件判断连接池中不存在空闲连接,则会返回步骤S306按照设定规则持续判断连接池中是否存在与数据库之间的空闲连接,直至连接池中出现空闲连接,选择出现的空闲连接。
优选地,设定规则可以设置成包括但不限于以下规则:
第一种规则,中间件按照设定时间间隔判断连接池中是否存在与数据库之间的空闲连接。其中,时间间隔的设定可以由本领域技术人员根据实际需求进行设置,例如:设置成在轮询连接池中的所有与数据库之间的连接后隔1秒再次对连接池中的连接进行轮询。
第二种规则,中间件实时判断连接池中是否存在与数据库之间的空闲连接。
需要说明的是,该步骤中判断连接池中是否存在与数据库之间的空闲连接,直至连接池中出现空闲连接时,可以选择采用步骤S306中说明的任一种优选的方式。
步骤S312:中间件将选择的空闲连接的连接状态从空闲更改为忙碌,并使用选择的空闲连接向数据库发送业务请求。
中间件通过将所选择的空闲连接的连接状态更改为忙碌,可以高效快速地判断出连接池中各个连接的当前状态,从而更为有效地为业务请求选择空闲连接。
中间件使用选择的空闲连接向数据库发送业务请求时,会根据业务请求在队列中所处的位置或者业务请求的优先级来发送业务请求,具体地:
当业务请求存放于待处理队列时,从待处理队列中依次取出业务请求,并为取出的业务请求分配空闲连接,使用分配的空闲连接将业务请求发送至数据库。
当业务请求存放于预设的缓存时,根据业务请求的优先级依次取出业务请求,并为取出的业务请求分配空闲连接,使用分配的空闲连接将业务请求发送至数据库。
也就是说,如果步骤S310中保存的业务请求如果位于待处理队列的第一位或者在预设的缓存中的优先级最高,那么,当选择出空闲连接时,则可直接将业务请求发送至数据库。而如果该业务请求并不位于待处理队列的第一位或者不是优先级最高的业务请求,则需要等待,直至将待处理队列中位于该业务请求前的业务请求、或者是优先级高于该优先级的业务请求发送至数据库后,才能够选择空闲连接将该业务请求发送至数据库。
步骤S314:中间件拦截数据库通过选择的空闲连接向应用返回的、对业务请求的响应结果。
数据库接收业务请求,在处理完该业务请求后,会通过之前中间件选择的空闲连接向应用返回对业务请求的响应结果。此时,中间件拦截该响应结果。
步骤S316:中间件根据拦截到的响应结果,将返回响应结果的连接的连接状态从忙碌更改为空闲,同时,中间件将拦截到的响应结果发送至发送业务请求的应用。
本步骤中,中间件在拦截到通过某连接返回的响应结果时,将该连接的连接状态由忙碌修改为空闲,便于中间件为尚未得到处理的业务请求分配连接,提高连接的使用率。
同时,中间件会将拦截到的响应结果发送至发送业务请求的应用。
需要说明的是,连接状态的修改与向应用发送响应结果可以同时并行执行,也可以以任意先后顺序执行。
通过本发明实施例提供的业务请求处理方法,在数据库系统尤其是非分布式数据库系统如关系型数据库系统中,设置位于应用和数据库之间的中间件,中间件拦截应用向数据库发送的业务请求,从连接池中选择与数据库之间的空闲连接来发送给业务请求,当连接池中存在空闲连接时,则可直接将业务请求通过空闲连接发送至数据库,当连接池中不存在空闲连接时,仍然正常接受应用的业务请求,待出现空闲连接时即将该业务请求发送至数据库进行处理,而不会向应用返回错误或失败消息。可见,应用只需发送一次业务请求,即可保证业务请求被数据库处理,既能够避免用户接收到业务请求失败的消息导致使用体验降低,又能够避免应用重复发送业务请求,因此,既能够降低应用所在终端以及网络的操作负担又能够提升用户的使用体验。此外,中间件仅是在数据库存在空闲连接时将业务请求发送至数据库处理,数据库无需重复判断连接池中是否存在空闲连接更不需要向应用返回业务请求失败的消息,因此,能够有效降低数据库的工作负荷。
实施例四
参照图4,示出了本发明实施例四的一种业务请求处理装置的结构示意图。
本发明实施的业务请求处理装置可以设置于应用装置和数据库装置之间,业务请求处理装置包括:第一拦截模块402,配置为拦截应用装置向数据库装置发送的业务请求;判断模块404,配置为判断连接池中是否存在与数据库装置之间的空闲连接;第一执行模块406,配置为若判断模块的判断结果为不存在空闲连接时,则保存业务请求,并按照设定规则持续判断连接池中是否存在与数据库装置之间的空闲连接,直至连接池中出现空闲连接;发送模块408,配置为选择出现的空闲连接,并使用选择的空闲连接将业务请求发送至数据库装置。需要说明的是,业务请求处理装置、应用装置和数据库装置可以设置在同一设备中,也可以分别设置在不同的设备中。本发明实施例中对此不作具体限制。
通过本发明实施例提供的业务请求处理装置,在数据库系统尤其是非分布式数据库系统如关系型数据库系统中,能够拦截应用装置向数据库装置发送的业务请求,从连接池中选择与数据库装置之间的空闲连接来发送给业务请求,当存在空闲连接时,则可直接将业务请求通过空闲连接发送至数据库装置,当不存在空闲连接时,仍然正常接受应用的业务请求,待出现空闲连接时即将该业务请求发送至数据库装进行处理,而不会向应用返回错误或失败消息。可见,应用装置只需发送一次业务请求,即可保证业务请求被数据库处理,既能够避免用户接收到业务请求失败的消息导致使用体验降低,又能够避免应用重复发送业务请求,因此,既能够降低应用所在终端以及网络的操作负担又能够提升用户的使用体验。此外,本发明实施例的业务请求处理装置仅是在数据库装置存在空闲连接时将业务请求发送至数据库装置处理,数据库装置无需重复判断自身是否存在空闲连接更不需要向应用返回业务请求失败的消息,因此,能够有效降低数据库装置的操作负担。
实施例五
参照图5,示出了本发明实施例五的一种业务请求处理装置的结构示意图。
本发明实施例对实施例四中的业务请求处理装置进行了进一步优化,优化后的业务请求处理装置包括:第一拦截模块502,配置为拦截应用装置向数据库装置发送的业务请求;判断模块504,配置为判断连接池中是否存在与数据库装置之间的空闲连接;第一执行模块506,配置为若判断模块的判断结果为不存在空闲连接时,则保存业务请,并按照设定规则持续判断连接池中是否存在与数据库装置之间的空闲连接,直至连接池中出现空闲连接,选择出现的空闲连接;发送模块508,配置为选择出现的空闲连接,并使用选择的空闲连接将业务请求发送至数据库装置。
优选地,本发明实施例的业务请求处理装置还包括:第二执行模块510,配置为若判断模块504的判断结果为连接池中存在与数据库的空闲连接时,则选择一个空闲连接,并使用选择的空闲连接将业务请求发送至数据库。
优选地,本发明实施例的业务请求处理装置还包括:第二拦截模块512,配置为拦截数据库装置通过选择的空闲连接向应用装置返回的、对业务请求的响应结果,并将拦截到的响应结果发送至发送业务请求的应用装置。
优选地,本实施例的业务请求处理装置还包括:连接池生成模块514,配置为在第一拦截模块502拦截应用装置向数据库装置发送的业务请求之前,根据数据库装置可支持的连接的信息,生成连接池,其中,连接池用于管理数据库装置可支持的连接。
优选地,第一拦截模块502,配置为拦截应用装置向数据库装置发送的业务请求,并向应用装置返回业务请求被接受的消息。
优选地,判断模块504包括:状态判断模块5042,配置为根据中间件装置自身的连接池中各连接的连接状态,判断中间件装置自身的连接池中是否存在中间件装置与数据库装置之间的空闲连接;确定模块5044,配置 为当状态判断模块5042的判断结果为存在连接状态为空闲的连接时,确定连接池中存在与数据库装置之间的空闲连接;当状态判断模块5042的判断结果为所有连接的状态均为忙碌时,确定连接池中不存在与数据库装置之间的空闲连接。
优选地,发送模块508,配置为将选择的空闲连接的连接状态从空闲更改为忙碌,并使用选择的空闲连接向数据库装置发送业务请求;本发明实施例的业务请求息处理装置还包括:连接状态更改模块516,配置为在第二拦截模块512拦截数据库装置通过选择的空闲连接向应用装置返回的、对业务请求的响应结果之后,根据拦截到的响应结果,将返回响应结果的连接的连接状态从忙碌更改为空闲。
优选地,第一执行模块506按照设定规则持续判断连接池中是否存在与数据库装置之间的空闲连接时:当判断拦截到数据库装置返回的响应结果时,则确定连接池中存在与数据库装置之间的空闲连接。
优选地,第一执行模块506按照设定规则持续判断连接池中是否存在与数据库装置之间的空闲连接时:按照设定时间间隔判断连接池中是否存在与数据库装置之间的空闲连接;或者,实时判断连接池中是否存在与数据库装置之间的空闲连接。
优选地,第一执行模块506保存业务请求时,将业务请求存放入待处理队列;或者,将业务请求存放入预设的缓存。
优选地,发送模块508使用选择的空闲连接将业务请求发送至数据库装置时:当业务请求存放于待处理队列时,从待处理队列中依次取出业务请求,并为取出的业务请求分配空闲连接,使用分配的空闲连接将业务请求发送至数据库装置;当业务请求存放于预设的缓存时,根据业务请求的优先级依次取出业务请求,并为取出的业务请求分配空闲连接,使用分配的空闲连接将业务请求发送至数据库装置。
优选地,本发明实施例的业务请求处理装置应用于非分布式数据库系统。
优选地,本发明实施例的业务请求处理装置应用于关系型数据库系 统。
优选地,本发明实施例的业务请求处理装置为中间件装置,该中间件装置设置于应用装置和数据库之间,中间件装置中设置有自身的连接池,中间件在拦截到应用装置向数据库装置发送的业务请求时,判断中间件装置自身的连接池中是否存在中间件与数据库装置之间的空闲连接;当判断出存在中间件与数据库装置之间的空闲连接时,选择一个空闲连接,并使用选择的空闲连接将业务请求发送至所述数据库。当判断出不存在中间件与数据库装置之间的空闲连接时,则保存拦截到的业务请求,并按照设定规则持续判断自身的连接池中是否存在中间件与数据库装置之间的空闲连接,直至连接池中出现空闲连接,选择出现的空闲连接,并使用选择的空闲连接将业务请求发送至数据库装置。
本发明实施例的业务请求处理装置用于实现前述实施例一、实施例二以及实施例三中相应的业务请求处理的方法,并且具有相应的方法实施例的有益效果,在此不再赘述。
在此提供的业务请求处理方案不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造具有本发明方案的系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个 权利要求中所明确记载的特征更多的特征。更确切地说,如权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的业务请求处理方案中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
例如,图6示出了可以实现根据本发明的业务请求处理方法的计算设 备。该计算设备传统上包括处理器610和以存储器620形式的计算机程序产品或者计算机可读介质。存储器620可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器620具有存储用于执行上述方法中的任何方法步骤的程序代码631的存储空间630。例如,存储程序代码的存储空间630可以包括分别用于实现上面的方法中的各种步骤的各个程序代码631。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为例如图7所示的便携式或者固定存储单元。该存储单元可以具有与图6的计算设备中的存储器620类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码631’,即可以由诸如610之类的处理器读取的代码,当这些代码由计算设备运行时,导致该计算设备执行上面所描述的方法中的各个步骤。
本文中所称的“一个实施例”、“实施例”或者“一个或者多个实施例”意味着,结合实施例描述的特定特征、结构或者特性包括在本发明的至少一个实施例中。此外,请注意,这里“在一个实施例中”的词语例子不一定全指同一个实施例。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下被实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”或“包括”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适 当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。

Claims (30)

  1. 一种业务请求处理方法,包括:
    拦截应用向数据库发送的业务请求;
    判断连接池中是否存在与所述数据库的空闲连接;
    若不存在,则保存所述业务请求,并按照设定规则持续判断所述连接池中是否存在所述与所述数据库的空闲连接,直至所述连接池中出现所述空闲连接;以及
    选择出现的所述空闲连接,并使用选择的所述空闲连接将所述业务请求发送至所述数据库。
  2. 根据权利要求1所述的方法,还包括:
    若连接池中存在与所述数据库的空闲连接,则选择一个空闲连接,并使用选择的所述空闲连接将所述业务请求发送至所述数据库。
  3. 根据权利要求1所述的方法,其中,所述方法还包括:
    拦截所述数据库通过选择的所述空闲连接向所述应用返回的、对所述业务请求的响应结果,并将拦截到的所述响应结果发送至所述发送业务请求的应用。
  4. 根据权利要求1所述的方法,其中,在所述拦截应用向数据库发送的业务请求的步骤之前,所述方法还包括:
    根据所述数据库可支持的连接的信息,生成所述连接池,其中,所述连接池用于管理所述数据库可支持的连接。
  5. 根据权利要求1所述的方法,其中,所述拦截应用向数据库发送的业务请求包括:
    拦截所述应用向所述数据库发送的业务请求,并向所述应用返回所述业务请求被接受的消息。
  6. 根据权利要求1所述的方法,其中,所述判断连接池中是否存在与所述数据库之间的空闲连接的步骤包括:
    根据连接池中各连接的连接状态,判断连接池中是否存在与所述数据库之间的空闲连接;
    当存在连接状态为空闲的连接时,确定连接池中存在与所述数据库之间的空闲连接;当所有连接的状态均为忙碌时,确定连接池中不存在与所述数据库之间的空闲连接。
  7. 根据权利要求6所述的方法,其中,所述使用选择的所述空闲连接将所述业务请求发送至所述数据库的步骤包括:
    将选择的所述空闲连接的连接状态从空闲更改为忙碌,并使用选择的所述空闲连接向所述数据库发送所述业务请求。
  8. 根据权利要求3所述的方法,其中,在所述拦截所述数据库通过选择的所述空闲连接向所述应用返回的、对所述业务请求的响应结果步骤之后,所述方法还包括:
    根据拦截到的所述响应结果,将返回所述响应结果的连接的连接状态从忙碌更改为空闲。
  9. 根据权利要求8所述的方法,其中,所述按照设定规则持续判断所述连接池中是否存在与所述数据库之间的空闲连接的步骤包括:
    当判断拦截到所述数据库返回的响应结果时,则确定所述连接池中存在与所述数据库之间的空闲连接。
  10. 根据权利要求8所述的方法,其中,所述按照设定规则持续判断所述连接池中是否存在与所述数据库之间的空闲连接的步骤包括:
    按照设定时间间隔判断所述连接池中是否存在与所述数据库之间的空闲连接;
    或者,
    实时判断所述连接池中是否存在与所述数据库之间的空闲连接。
  11. 根据权利要求2所述的方法,其中,所述保存所述业务请求的步骤包括:
    将所述业务请求存放入待处理队列;或者,将所述业务请求存放入预设的缓存。
  12. 根据权利要求11所述的方法,其中,所述使用选择的所述空闲连接将所述业务请求发送至所述数据库的步骤,包括:
    当所述业务请求存放于待处理队列时,从所述待处理队列中依次取出业务请求,并为取出的所述业务请求分配空闲连接,使用分配的所述空闲连接将所述业务请求发送至所述数据库;
    当所述业务请求存放于预设的缓存时,根据所述业务请求的优先级依次取出所述业务请求,并为取出的所述业务请求分配空闲连接,使用分配的所述空闲连接将所述业务请求发送至所述数据库。
  13. 根据权利要求1所述的方法,其中,所述业务请求处理方法应用于非分布式数据库系统。
  14. 根据权利要求1或13所述的方法,其中,所述业务请求处理方法应用于关系型数据库系统。
  15. 一种业务请求处理装置,所述业务请求处理装置包括:
    第一拦截模块,配置为拦截应用装置向数据库装置发送的业务请求;
    判断模块,配置为判断连接池中是否存在与数据库装置之间的空闲连接;
    第一执行模块,配置为若所述判断模块的判断结果为不存在空闲连接时,则保存所述业务请求,并按照设定规则持续判断所述连接池中是否存在所述与所述数据库装置之间的空闲连接,直至所述连接池中出现所述空闲连接;以及
    发送模块,配置为选择出现的所述空闲连接,并使用选择的所述空闲连接将所述业务请求发送至所述数据库装置。
  16. 根据权利要求15所述的业务请求处理装置,其中,所述装置还包括:
    第二执行模块,配置为若所述判断模块的判断结果为连接池中存在与所述数据库的空闲连接时,则选择一个空闲连接,并使用选择的所述空闲连接将所述业务请求发送至所述数据库。
  17. 根据权利要求15所述的业务请求处理装置,还包括:
    第二拦截模块,配置为拦截所述数据库装置通过选择的所述空闲连接 向所述应用装置返回的、对所述业务请求的响应结果,并将拦截到的所述响应结果发送至所述发送业务请求的应用装置。
  18. 根据权利要求15所述的业务请求处理装置,其中,所述装置还包括:
    连接池生成模块,配置为在所述第一拦截模块拦截应用装置向数据库装置发送的业务请求之前,根据所述数据库装置可支持的连接的信息,生成所述连接池,其中,所述连接池用于管理所述数据库装置可支持的连接。
  19. 根据权利要求15所述的业务请求息处理装置,其中,所述第一拦截模块,配置为拦截所述应用装置向所述数据库装置发送的业务请求,并向所述应用装置返回所述业务请求被接受的消息。
  20. 根据权利要求15所述的业务请求处理装置,其中,所述判断模块包括:
    状态判断模块,配置为根据所述连接池中各连接的连接状态,判断连接池中是否存在与所述数据库装置之间的空闲连接;
    确定模块,用于当所述状态判断模块的判断结果为存在连接状态为空闲的连接时,确定所述连接池中存在与所述数据库装置之间的空闲连接;当所述状态判断模块的判断结果为所有连接的状态均为忙碌时,确定连接池中不存在与所述数据库装置之间的空闲连接。
  21. 根据权利要求20所述的业务请求处理装置,其中,所述发送模块,配置为将选择的所述空闲连接的连接状态从空闲更改为忙碌,并使用选择的所述空闲连接向所述数据库装置发送所述业务请求;
  22. 根据权利要求18所述的业务请求处理装置,所述业务信息处理装置还包括:
    连接状态更改模块,配置为在所述第二拦截模块拦截所述数据库装置通过选择的所述空闲连接向所述应用装置返回的、对所述业务请求的响应结果之后,根据拦截到的所述响应结果,将返回所述响应结果的连接的连接状态从忙碌更改为空闲。
  23. 根据权利要求22所述的业务请求处理装置,其中,所述执行模块按照设定规则持续判断所述连接池中是否存在与所述数据库装置之间的空闲连接时:
    当判断拦截到所述数据库装置返回的响应结果时,则确定所述连接池中存在与所述数据库装置之间的空闲连接。
  24. 根据权利要求22所述的业务请求处理装置,其中,所述执行模块按照设定规则持续判断所述连接池中是否存在与所述数据库装置之间的空闲连接时:
    按照设定时间间隔判断所述连接池中是否存在与所述数据库装置之间的空闲连接;
    或者,
    实时判断所述连接池中是否存在与所述数据库装置之间的空闲连接。
  25. 根据权利要求16所述的业务请求处理装置,其中,所述第一执行模块保存所述业务请求时,将所述业务请求存放入待处理队列;或者,将所述业务请求存放入预设的缓存。
  26. 根据权利要求25所述的业务请求处理装置,其中,所述发送模块使用选择的所述空闲连接将所述业务请求发送至所述数据库装置时:
    当所述业务请求存放于待处理队列时,从所述待处理队列中依次取出业务请求,并为取出的所述业务请求分配空闲连接,使用分配的所述空闲连接将所述业务请求发送至所述数据库装置;
    当所述业务请求存放于预设的缓存时,根据所述业务请求的优先级依次取出所述业务请求,并为取出的所述业务请求分配空闲连接,使用分配的所述空闲连接将所述业务请求发送至所述数据库装置。
  27. 根据权利要求15所述的业务请求处理装置,其中,所述业务信息处理装置应用于非分布式数据库系统。
  28. 根据权利要求15或27所述的业务请求处理装置,其中,所述业务信息处理装置应用于关系型数据库系统。
  29. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在 计算设备上运行时,导致所述计算设备执行根据权利要求1-14中的任一项所述的业务请求处理方法。
  30. 一种计算机可读介质,其中存储了如权利要求29所述的计算机程序。
PCT/CN2015/095545 2014-12-31 2015-11-25 业务请求处理方法和装置 Ceased WO2016107340A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410854779.3A CN104572974B (zh) 2014-12-31 2014-12-31 业务请求处理方法和装置
CN201410854779.3 2014-12-31

Publications (1)

Publication Number Publication Date
WO2016107340A1 true WO2016107340A1 (zh) 2016-07-07

Family

ID=53089036

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/095545 Ceased WO2016107340A1 (zh) 2014-12-31 2015-11-25 业务请求处理方法和装置

Country Status (2)

Country Link
CN (1) CN104572974B (zh)
WO (1) WO2016107340A1 (zh)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111078372A (zh) * 2019-12-20 2020-04-28 北京思特奇信息技术股份有限公司 一种自动化进程管理方法及系统
CN112532403A (zh) * 2019-09-17 2021-03-19 中盈优创资讯科技有限公司 网元适配的驱动服务装置、网元适配方法及系统
CN112612834A (zh) * 2020-12-23 2021-04-06 瀚高基础软件股份有限公司 数据库中间件及其实现客户端与服务器连接的方法
CN112954076A (zh) * 2021-03-31 2021-06-11 沃科合众科技(北京)股份有限公司 数据采集方法
CN113434479A (zh) * 2021-06-07 2021-09-24 北京许继电气有限公司 一种实现自主可控数据库连接池的方法和系统
CN114500628A (zh) * 2021-12-30 2022-05-13 天翼云科技有限公司 一种连接选择方法及装置
CN115801886A (zh) * 2022-11-16 2023-03-14 浪潮通用软件有限公司 一种屏蔽中间件差异的中间件连接系统和方法
CN116701508A (zh) * 2023-05-30 2023-09-05 浪潮云信息技术股份公司 基于缓存的多源数据管理方法及系统
CN117081845A (zh) * 2023-09-26 2023-11-17 中国电信股份有限公司技术创新中心 一种数据获取请求的拦截方法及相关装置
CN117177263A (zh) * 2023-07-24 2023-12-05 中国电信股份有限公司技术创新中心 网元连接管理方法、系统及相关设备

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572974B (zh) * 2014-12-31 2018-10-12 北京奇虎科技有限公司 业务请求处理方法和装置
CN106257456A (zh) * 2016-07-08 2016-12-28 北京京东尚科信息技术有限公司 高并发请求下提高数据库稳定性的方法、装置及系统
CN106302421B (zh) * 2016-08-08 2019-07-16 腾讯科技(深圳)有限公司 一种信息拦截处理方法以及装置
CN106341447A (zh) * 2016-08-12 2017-01-18 中国南方电网有限责任公司 基于移动终端的数据库业务智能交换方法
CN108259559A (zh) * 2017-12-06 2018-07-06 中国航空工业集团公司西安航空计算技术研究所 一种基于udp协议的多会话数据传输实现方法
CN109800067A (zh) * 2018-12-15 2019-05-24 中国平安人寿保险股份有限公司 基于云监控的数据库连接优化方法、装置及相关设备
CN113126882B (zh) * 2019-12-30 2026-03-17 深圳市中兴微电子技术有限公司 数据处理方法及装置、存储介质、电子装置
CN112732441B (zh) * 2021-01-07 2022-12-06 众阳健康科技集团有限公司 一种多元动态连接池的连接方法、装置及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103605571A (zh) * 2013-11-20 2014-02-26 国家电网公司 数据库连接池的控制方法
US20140324910A1 (en) * 2013-04-26 2014-10-30 Oracle International Corporation System and method for connection labeling for use with connection pools
CN104239365A (zh) * 2013-06-24 2014-12-24 北京新媒传信科技有限公司 一种获取数据库连接池中连接的方法和数据库连接池
CN104572974A (zh) * 2014-12-31 2015-04-29 北京奇虎科技有限公司 业务请求处理方法和装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8943181B2 (en) * 2005-11-29 2015-01-27 Ebay Inc. Method and system for reducing connections to a database
CN103729373B (zh) * 2012-10-15 2017-08-04 北京新媒传信科技有限公司 一种数据库代理方法和装置
CN104063451B (zh) * 2014-06-23 2019-03-26 北京京东尚科信息技术有限公司 一种数据库连接管理方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140324910A1 (en) * 2013-04-26 2014-10-30 Oracle International Corporation System and method for connection labeling for use with connection pools
CN104239365A (zh) * 2013-06-24 2014-12-24 北京新媒传信科技有限公司 一种获取数据库连接池中连接的方法和数据库连接池
CN103605571A (zh) * 2013-11-20 2014-02-26 国家电网公司 数据库连接池的控制方法
CN104572974A (zh) * 2014-12-31 2015-04-29 北京奇虎科技有限公司 业务请求处理方法和装置

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112532403A (zh) * 2019-09-17 2021-03-19 中盈优创资讯科技有限公司 网元适配的驱动服务装置、网元适配方法及系统
CN112532403B (zh) * 2019-09-17 2023-08-08 中盈优创资讯科技有限公司 网元适配的驱动服务装置、网元适配方法及系统
CN111078372B (zh) * 2019-12-20 2023-08-08 北京思特奇信息技术股份有限公司 一种自动化进程管理方法及系统
CN111078372A (zh) * 2019-12-20 2020-04-28 北京思特奇信息技术股份有限公司 一种自动化进程管理方法及系统
CN112612834A (zh) * 2020-12-23 2021-04-06 瀚高基础软件股份有限公司 数据库中间件及其实现客户端与服务器连接的方法
CN112954076A (zh) * 2021-03-31 2021-06-11 沃科合众科技(北京)股份有限公司 数据采集方法
CN112954076B (zh) * 2021-03-31 2023-04-07 沃科合众科技(北京)股份有限公司 数据采集方法
CN113434479A (zh) * 2021-06-07 2021-09-24 北京许继电气有限公司 一种实现自主可控数据库连接池的方法和系统
CN114500628A (zh) * 2021-12-30 2022-05-13 天翼云科技有限公司 一种连接选择方法及装置
CN115801886A (zh) * 2022-11-16 2023-03-14 浪潮通用软件有限公司 一种屏蔽中间件差异的中间件连接系统和方法
CN116701508A (zh) * 2023-05-30 2023-09-05 浪潮云信息技术股份公司 基于缓存的多源数据管理方法及系统
CN117177263A (zh) * 2023-07-24 2023-12-05 中国电信股份有限公司技术创新中心 网元连接管理方法、系统及相关设备
CN117081845A (zh) * 2023-09-26 2023-11-17 中国电信股份有限公司技术创新中心 一种数据获取请求的拦截方法及相关装置

Also Published As

Publication number Publication date
CN104572974B (zh) 2018-10-12
CN104572974A (zh) 2015-04-29

Similar Documents

Publication Publication Date Title
CN104572974B (zh) 业务请求处理方法和装置
US9336168B2 (en) Enhanced I/O performance in a multi-processor system via interrupt affinity schemes
US11068964B2 (en) Method and device for processing service request
CN106407830A (zh) 一种基于云的数据库的检测方法和装置
CN108959549A (zh) 数据写入方法、装置、计算设备及计算机存储介质
CN106201723A (zh) 一种数据中心的资源调度方法及装置
CN106385377B (zh) 一种信息处理方法和系统
CN113794764A (zh) 服务器集群的请求处理方法、介质和电子设备
CN106257456A (zh) 高并发请求下提高数据库稳定性的方法、装置及系统
CN110007877A (zh) 主机与双控存储设备间数据传输方法、装置、设备及介质
JP5911548B1 (ja) 共有メモリへのアクセス要求をスケジューリングするための装置、方法およびコンピュータプログラム
CN106790289A (zh) 一种基于Nginx服务器的动态负载处理方法及系统
WO2016101748A1 (zh) 一种网络连接的缓存方法和装置
CN103336721A (zh) 数据库操作请求分配方法、设备和系统
CN102622274B (zh) 计算机装置及其中断任务分配方法
CN107294911B (zh) 一种数据包监听方法及装置、远程过程调用系统、设备
CN110750517A (zh) 一种本地存储引擎系统的数据处理方法、装置以及设备
CN108062224B (zh) 基于文件句柄的数据读写方法、装置及计算设备
WO2016091086A1 (zh) 虚拟化安全检测方法与系统
CN105931054A (zh) 一种交易请求处理方法、网关设备、代理设备及业务设备
CN106598706B (zh) 一种提高服务器的稳定性的方法、装置及服务器
CN105610934A (zh) 数据请求并发处理方法及装置
CN109491785B (zh) 内存访问调度方法、装置及设备
CN111800446A (zh) 调度处理方法、装置、设备和存储介质
CN103593191A (zh) 调用应用程序数据的方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15875019

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15875019

Country of ref document: EP

Kind code of ref document: A1