WO2016184175A1 - Database processing method and apparatus - Google Patents

Database processing method and apparatus Download PDF

Info

Publication number
WO2016184175A1
WO2016184175A1 PCT/CN2016/073373 CN2016073373W WO2016184175A1 WO 2016184175 A1 WO2016184175 A1 WO 2016184175A1 CN 2016073373 W CN2016073373 W CN 2016073373W WO 2016184175 A1 WO2016184175 A1 WO 2016184175A1
Authority
WO
WIPO (PCT)
Prior art keywords
data server
proxy client
data
processing
database
Prior art date
Application number
PCT/CN2016/073373
Other languages
French (fr)
Chinese (zh)
Inventor
吴秋鹏
丁岩
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016184175A1 publication Critical patent/WO2016184175A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]

Definitions

  • the present invention relates to the field of communications, and in particular to a database processing method and apparatus.
  • Enterprise application software will have a large number of database access operations. In the software logic architecture, it will generally act as a separate layer, that is, the data access layer.
  • the business logic layer (that is, the business application) calls the database access layer to access the resources in the database. Decouple business logic and database access logic to separate low-level data access logic from high-level business logic.
  • the business logic ie, business application
  • the database access object is flawed internally or the program is not robust, the business logic will also crash when a serious exception occurs.
  • the application software is deployed at a single point, the entire software service will be interrupted. If the application software is distributed, although other service nodes can still serve externally, the throughput of the entire system will be reduced by one node.
  • the invention provides a database processing method and device, so as to at least solve the problem that the business service is interrupted due to database access logic abnormality existing in the related art.
  • a database processing method includes: receiving, by a proxy client, a processing request sent by a service application, where the processing request is used to request processing of data in the database; Determining a data server for executing the foregoing processing request, wherein the service application accesses the database through the proxy client and the data server; the proxy client sends the processing request to the determined data server; The data server processes the data in the database according to the processing request; the determined data server sends the processing result to the proxy client; the proxy client receives the above The processing result is sent to the above business application.
  • the foregoing proxy client determines, by at least one of the following manners, that the data server for executing the foregoing processing request includes: the proxy client determines the data server according to the predetermined configuration; and the proxy client is configured according to the size of the data server load Determining a data server, wherein the proxy client selects a data server with the least load.
  • the method further includes: after the data server is abnormal according to the predetermined configuration, the proxy client selects another data server in a normal running state.
  • the method further includes: after the data server determined according to the predetermined configuration returns to normal, the proxy client reselects the foregoing determining according to the predetermined configuration.
  • the data server acts as a data server that performs the above processing request.
  • the proxy client receiving the processing request by using an interface, where the interface includes at least one of the following: an interface of an entry parameter including information of service data, The interface of the access parameter database access request, the information of the service data is used to indicate the data that the service application needs to process.
  • the above interface is a local interface.
  • the proxy client sending the processing request to the determined data server includes: the proxy client encoding the processing request into a request packet according to a predetermined communication protocol; and the proxy client sending the request packet to the request packet The data server identified above.
  • the foregoing determined data server sends the foregoing processing result to the proxy client, where the data server returns the processing result to the proxy client according to a predetermined communication protocol.
  • a database processing apparatus including: a receiving module, wherein the receiving module is applied to a proxy client, and is configured to receive a processing request sent by a service application, where the processing request is used for Requesting to process data in the foregoing database; determining a module, wherein the determining module is applied to the proxy client, and is configured to determine a data server for executing the processing request, wherein the service application passes the proxy client and the foregoing data
  • the server accesses the database; the first sending module, the first sending module is applied to the proxy client, and is configured to send the processing request to the determined data server; the processing module, the processing module is applied to the determined data server The second sending module is configured to apply the processing result to the proxy client, where the second sending module is applied to the determined data server.
  • Three transmission module the above third transmission mode Applied to the agent client, transmits to the service application is provided above the processing result received.
  • the determining module includes: a first determining unit, configured to determine a data server according to a predetermined configuration; and a second determining unit, configured to determine a data server according to a size of a data server load, where the proxy client selects The least loaded data server.
  • the determining module further includes: a first selecting unit, configured to be a data service determined according to a predetermined configuration. After the terminal is abnormal, select another data server that is in normal operation.
  • the determining module further includes: a second selecting unit, configured to reselect the data server determined according to the predetermined configuration as the data service for executing the processing request after the data server determined according to the predetermined configuration returns to normal end.
  • a second selecting unit configured to reselect the data server determined according to the predetermined configuration as the data service for executing the processing request after the data server determined according to the predetermined configuration returns to normal end.
  • the receiving module includes: a receiving unit, configured to receive the processing request by using an interface, where the interface includes at least one of the following: an interface that includes information of service data, an interface of an access parameter database access request, and the foregoing
  • the information of the service data is used to indicate the data that the above business application needs to process.
  • the above interface is a local interface.
  • the first sending module includes: an encoding unit configured to encode the processing request into a request message according to a predetermined communication protocol; and the sending unit is configured to send the request message to the determined data server.
  • the foregoing second sending module includes: a returning unit, configured to return the processing result to the proxy client according to a predetermined communication protocol.
  • the proxy client receives a processing request sent by the service application, where the processing request is used to request processing of data in the database; and the proxy client determines a data server for executing the processing request.
  • the service application accesses the database through the proxy client and the data server; the proxy client sends the processing request to the determined data server; and the determined data server performs the request in the database according to the processing request.
  • the data is processed; the determined data server sends the processing result to the proxy client; and the proxy client sends the received processing result to the service application.
  • the data access logic is encapsulated into a data service system, and the proxy client in the data service system can be directly called by the business application, shielding the complexity of the data service, and the execution request can be determined by the proxy client.
  • Data server, and the number of data servers can be more than two, thus ensuring that when a data server is abnormal, other data servers can be used to execute processing requests to ensure normal operation of the service and reduce the impact.
  • the problem that the business service is interrupted due to the database access logic abnormality existing in the related art is solved, thereby achieving the effect of ensuring the normal operation of the service service.
  • FIG. 1 is a flow chart of a database processing method according to an embodiment of the present invention.
  • FIG. 2 is a block diagram showing the structure of a database processing apparatus according to an embodiment of the present invention.
  • FIG. 3 is a structural block diagram of a determining module 24 in a database processing apparatus according to an embodiment of the present invention
  • FIG. 4 is a block diagram 1 of a preferred structure of the determining module 24 in the database processing apparatus according to an embodiment of the present invention
  • FIG. 5 is a block diagram 2 of a preferred structure of the determining module 24 in the database processing apparatus according to an embodiment of the present invention
  • FIG. 6 is a structural block diagram of a receiving module 22 in a database processing apparatus according to an embodiment of the present invention.
  • FIG. 7 is a structural block diagram of a first transmitting module 26 in a database processing apparatus according to an embodiment of the present invention.
  • FIG. 8 is a structural block diagram of a second sending module 210 in a database processing apparatus according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram showing a basic flow of a service application calling data service according to an embodiment of the present invention.
  • FIG. 10 is a schematic diagram of a communication flow according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of a data service system when a single application scenario is performed according to an embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of a data service system in a distributed application scenario according to an embodiment of the present invention.
  • FIG. 13 is a block diagram showing the structure of a data service system according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a database processing method according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
  • Step S102 the proxy client receives a processing request sent by the service application, where the processing request is used to request processing of data in the database;
  • Step S104 the proxy client determines a data server for executing a processing request, wherein the service application accesses the database through the proxy client and the data server;
  • Step S106 the proxy client sends the processing request to the determined data server
  • Step S108 the determined data server processes the data in the database according to the processing request
  • Step S110 the determined data server sends the processing result to the proxy client.
  • Step S112 the proxy client sends the received processing result to the service application.
  • the data access logic is encapsulated into a data service system, and the data service system is divided into a proxy client and a data server.
  • the proxy client is integrated and directly invoked by the business application, and the proxy client and the data server can be Communicate via the network.
  • the proxy client in the data service system can be directly called by the business application, shielding the complexity of the data service, and the data server executing the processing request can be determined by the proxy client, and the data server is The number can be more than two, which ensures that when a data server is abnormal, other can be used.
  • the data server executes the processing request to ensure the normal operation of the service and reduces the impact, thereby solving the problem that the service service is interrupted due to the database access logic abnormality in the related technology, thereby achieving the effect of ensuring the normal operation of the service service.
  • the proxy client may determine, by at least one of the following methods, a data server for executing a processing request: the proxy client determines a data server according to a predetermined configuration; and the proxy client is configured according to the data server.
  • the size of the load determines the data server, where the proxy client selects the data server with the least load. Therefore, when the proxy client determines the data server, there may be multiple determination manners.
  • One way is to determine the data server according to the predetermined configuration, that is, each proxy client may have a pre-configured data server.
  • the pre-configured data server is the default configured data server.
  • the default configured data server can be one or more.
  • the proxy client can use the default configured data service to process the database accordingly.
  • the proxy client when the proxy client does not have a data server configured by default, the proxy client may select a data server according to a predetermined rule, and the predetermined rule may have multiple types, for example, the data with the smallest load may be selected.
  • the server can select the data server with the strongest processing capability, or randomly select the data server in the idle state.
  • the above manner of determining the data server is only an example, and the manner of determining the data server is not limited to the above manner.
  • the proxy client can determine the data server according to the predetermined configuration.
  • the data server determined according to the predetermined configuration may be abnormal, and the data server determined according to the predetermined configuration is abnormal. After that, the proxy client needs to select another data server for executing the processing request.
  • the proxy client selects other normal operations. The status of the data server.
  • the selection principle can be consistent with the predetermined rule in the above embodiment, that is, the data server with the least load can be selected, and the data server with the strongest processing capability can be selected, or can be randomly selected. In the idle data server, of course, there may be other selection methods.
  • the proxy client polls other data servers in a predetermined order, and finds the idle and working data server, the idle and A data server that works fine. Since the data server can execute the processing request, the data server encapsulates the database access logic and is deployed separately.
  • the data server can establish and maintain a database connection with one or more databases; and the number of data servers can be two. Or more, multiple data servers can form a cluster.
  • determining the abnormality of the data server there may be various determination methods, such as when the data server is abnormal in heartbeat or the network is interrupted.
  • the method further includes: when the data server determined according to the predetermined configuration returns to normal, the proxy client reselects The data server determined according to the predetermined configuration is used as a data server that executes the processing request. Therefore, it is guaranteed that the data server connected to other proxy clients is not occupied for a long time.
  • the receiving, by the proxy client, the processing request sent by the service application comprises: the proxy client receiving the processing request through the interface, wherein the interface comprises at least one of the following: the interface of the entry parameter including the information of the service data
  • the interface of the access parameter database access request, the information of the service data is used to indicate data that the service application needs to process.
  • the information of the foregoing service data may include a uniquely identified data service ID and a service parameter, and the service parameter may be a query condition, or may be a service data that needs to be inserted into a database, etc.; the above-mentioned entry parameter database access request may be a standard structured Query Language (SQL).
  • SQL structured Query Language
  • the foregoing interface may be a local interface, that is, the service application invokes the proxy client in a local interface manner.
  • the processing request may first be encoded into the request message according to the predetermined communication protocol; and then the request message is sent to the request message.
  • the data server may convert the database into the SQL access database for database operation or directly according to the previously configured database connection information and data service logic. Forwarding the database access request; and returning the database operation result to the proxy client according to the internal communication protocol, wherein the data server returns the operation result in the manner of the response message when returning the operation result.
  • the proxy client can obtain and parse the response packet returned by the data server, and return the response result to the service application.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present invention in essence or the contribution to the related art can be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, CD-ROM).
  • the instructions include a number of instructions for causing a terminal device (which may be a cell phone, computer, server, or network device, etc.) to perform the methods of various embodiments of the present invention.
  • a database processing device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • the apparatus includes a receiving module 22, a determining module 24, a first sending module 26, a processing module 28, a second sending module 210, and a The three sending module 212, wherein the receiving module 22, the determining module 24, the first sending module 26, and the third sending module 212 are applied to the proxy client, and the processing module 28 and the second sending module 210 are applied to the data server.
  • the device is described below:
  • the receiving module 22 is configured to receive a processing request sent by the service application, where the processing request is used to request processing of data in the database; and the determining module 24 is configured to determine a data server for executing the processing request, where The service application accesses the database through the proxy client and the data server; the first sending module 26 is configured to send the processing request to the determined data server; the processing module 28 is configured to process the data in the database according to the processing request; The second sending module 210 is configured to send the processing result to the proxy client, and the third sending module 212 is configured to send the received processing result to the service application.
  • FIG. 3 is a structural block diagram of a determining module 24 in a database processing apparatus according to an embodiment of the present invention. As shown in FIG. 3, the determining module 24 includes a first determining unit 32 and a second determining unit 34, and the determining module 24 is provided below. Be explained:
  • the first determining unit 32 is configured to determine the data server according to the predetermined configuration; the second determining unit 34 is configured to determine the data server according to the size of the data server load, wherein the proxy client selects the data server with the least load.
  • the determining module 24 includes a first selecting unit 42 in addition to the unit shown in FIG.
  • the determination module 24 will be described below.
  • the first selecting unit 42 is connected to the first determining unit 32, and is configured to select another data server in a normal running state after the data server terminal determined according to the predetermined configuration is abnormal.
  • FIG. 5 is a block diagram of a preferred structure of the determining module 24 in the database processing apparatus according to the embodiment of the present invention. As shown in FIG. 5, the determining module 24 includes a second selecting unit 52 in addition to the unit shown in FIG. The determination module 24 will be described below.
  • the second selecting unit 52 is connected to the first selecting unit 42 and configured to reselect the data server determined according to the predetermined configuration as the data server performing the processing request after the data server determined according to the predetermined configuration returns to normal. .
  • FIG. 6 is a structural block diagram of a receiving module 22 in a database processing apparatus according to an embodiment of the present invention. As shown in FIG. 6, the receiving module 22 includes a receiving unit 62, and the receiving unit 62 will be described below.
  • the receiving unit 62 is configured to receive a processing request by using an interface, where the interface includes at least one of the following: an interface that includes information of service data, an interface of an access parameter database access request, and information of the service data is used to indicate the foregoing service. Apply the data that needs to be processed.
  • the above interface is a local interface.
  • FIG. 7 is a structural block diagram of a first sending module 26 in a database processing apparatus according to an embodiment of the present invention. As shown in FIG. 7, the first transmitting module 26 includes an encoding unit 72 and a transmitting unit 74, and the first sending is performed below. Module 26 is described.
  • the encoding unit 72 is configured to encode the processing request into the request message according to a predetermined communication protocol; the transmitting unit 74 is connected to the encoding unit 72, and is configured to send the request message to the determined data server.
  • FIG. 8 is a structural block diagram of a second sending module 210 in a database processing apparatus according to an embodiment of the present invention. As shown in FIG. 8, the second sending module 210 includes a returning unit 82, which is described below.
  • Returning unit 82 is arranged to return the processing result to the proxy client in accordance with a predetermined communication protocol.
  • the following takes the information of the service data as the data service ID and the service parameter, and the above-mentioned entry parameter database access request is an example of the SQL, and the present invention is described:
  • FIG. 9 is a schematic diagram of a basic process of invoking a data service by a service application according to an embodiment of the present invention. As shown in FIG. 9, the process includes the following steps:
  • Step S902 the service application locally invokes an interface in the proxy client, and transmits the data service ID and the service parameter.
  • Step S904 the proxy client encodes the data service ID and the service parameter into a request message, and then sends the data message to the data server.
  • Step S906 after receiving the request message sent by the proxy client, the data server decodes the data service ID and the service. Parameters, converted to standard SQL according to the configuration, and access to the database through the database connection (Java DataBase Connectivity Java, JDBC for short) or Open DataBase Connectivity (ODBC) to execute the SQL, the SQL execution results are encoded into response messages Send to the proxy client.
  • Java DataBase Connectivity Java JDBC for short
  • ODBC Open DataBase Connectivity
  • Step S908 the proxy client receives the response packet sent by the data server, and decodes the SQL execution result and returns the result to the service application.
  • the data access logic is encapsulated into a data service system, and the data service system is divided into a proxy client and a data server.
  • the proxy client is integrated and directly invoked by the business software, shielding the complexity of the data service.
  • the data server is deployed in a cluster. When the data server connected to the proxy client is abnormal, or the data server is downgraded, the proxy client automatically switches to other normal data servers in the cluster, so that there is no business application. influences.
  • FIG. 10 is a schematic diagram of a communication process according to an embodiment of the present invention. As shown in FIG. 10, the process includes the following steps:
  • step S1002 when the business application needs to access the database, the unified java interface of the proxy client is invoked, and the data service ID and the service parameter, such as the query condition or the inserted service data, are uniquely identified.
  • step S1004 the proxy client encodes the above parameters into a request message according to an internal protocol, and sends the request to the data server of the default connection (the data server determined according to the predetermined configuration as described above).
  • Step S1006 After receiving the data service request message, the data server first decodes the request, extracts the data service ID and the service parameter in the request, and searches for a corresponding configuration of the corresponding data service ID in the data service configuration, including the database connection information.
  • the mapping between the SQL corresponding to the data service and the Java object, etc., the connection of the database is taken out from the database connection pool through the database connection information, and the SQL and business parameters are executed through the JDBC driver.
  • step S1008 the data server obtains the SQL execution result returned by the database.
  • step S1010 the data server encodes the SQL execution result returned by the database into a response message by using an internal protocol, and sends the response message to the proxy client.
  • Step S1012 After receiving the response message, the proxy client decodes the SQL execution result, and according to the mapping relationship between the data service and the java object, the SQL execution result is deserialized into a java object and returned to the service application.
  • the data service method of the present invention can be applied to a business application whether it is a single-node single-node application or a distributed application deployed as a multi-node.
  • FIG. 11 is a schematic structural diagram of a data service system when a single-application application scenario is performed according to an embodiment of the present invention.
  • a service application when a service application is a single-node single node, a data service needs to have a proxy client integrated by a service application, and two deployments are performed.
  • One or more data servers are used as a cluster.
  • the proxy client configures all data server connection information in the cluster.
  • the connection information includes the data server IP and the listening port.
  • all the data servers need to be started.
  • the default data server configured on the proxy client connection (the same data server as determined according to the predetermined configuration) is provided, and the data server is provided through the data server. .
  • the proxy client detects an abnormality in the default data server, polls the next data server in the cluster to connect. After the connection is successful, the new data server is used to provide the service application. data service.
  • FIG. 12 is a schematic structural diagram of a data service system in a distributed application scenario according to an embodiment of the present invention.
  • a service application is a multi-node distributed deployment scenario
  • the basic application is similar to a single-node service application, and the difference is that each The business application of each node integrates a proxy client, and deploys a data server for each business application.
  • the proxy client configuration of each business application is connected by default to its own data server (ie, the proxy client of each business application).
  • the end connection is a data server determined according to a predetermined configuration, and all data servers form a cluster.
  • the proxy client connects to the default data server.
  • the proxy client polls the next data server in the cluster to connect, and uses the new data server to provide data services to the business application after the connection is successful.
  • the proxy client periodically checks whether the default data server is restored to normal. If it returns to normal, all connections of the non-default data server are interrupted, the default data server is reconnected, and the data service is provided. To ensure that the data server of other nodes is not occupied for a long time.
  • FIG. 13 is a block diagram showing the structure of a data service system according to an embodiment of the present invention. As shown in FIG. 13, the system includes two major components: a proxy client 132 and a data server 134. The following respectively describe the modules of the two major components:
  • the proxy client 132 includes an application interface layer 1321 and a proxy client communication module 1322.
  • the application interface layer 1321 and the proxy client communication module 1322 are described below:
  • the interface is divided into the following two categories:
  • Data query interface the input parameter is the data service ID and parameter set, and the return value type is a collection object. Each element in the set is a javabean object, corresponding to a row of records of the data query.
  • the mapping relationship between the field returned by the data query and the javabean attribute is obtained by the proxy client communication module from the data server. Applicable to call data services that encapsulate the data query language, such as SELECT statements.
  • Data manipulation interface the input parameter is the data service ID and parameters, and the return value is the number of affected rows.
  • Proxy client communication module 1322
  • the proxy client communication module 1322 reads the default data server (the same data server determined according to the predetermined configuration) connection information and other data server connection information in the cluster from the configuration file.
  • the default data server 134 is connected, and the mapping between the SQL execution result and the return javabean is obtained from the data server 134 through an internal protocol.
  • the proxy client communication module 1322 encodes the data service ID and the service parameter of the interface into the parameter into a request message according to the JSON format, and sends the data to the connected data server 134, and blocks the reception and return. Response message or timeout. After receiving the response message, the response result is decoded, and the supply interface layer is encapsulated into a java object according to different interface types, and returned to the service application.
  • the proxy client communication module 1322 polls all data servers configured for the connection. Use this data server if it can connect properly.
  • the proxy client communication module 1322 periodically detects whether the default data server 134 is restored to normal. If the connection is normal, the data server is disconnected, and the default data server 134 is used. The default data server used by other proxy connections is not used for a long time.
  • the data server 134 includes a data server communication module 1341, a data service and SQL conversion module 1342, a SQL execution module 1343, a database connection module 1344, and a configuration module 1345. The following describes each module:
  • the data server communication module 1341 serves as a socket server to listen to the port, and initializes the thread pool. Each time a data service request is received, a thread is obtained from the thread pool to execute subsequent processing logic.
  • the data server communication module 1341 decodes the data service ID and the service parameters from the request message after receiving the request message, and passes it to the data service and SQL conversion module 1342 for processing, and returns the data service and the SQL conversion module 1342.
  • the coded message is sent to the proxy client 132.
  • the data service request is converted into SQL, and the SQL execution module 1343 is called to execute the SQL.
  • the SQL execution module 1343 obtains the database information corresponding to the data service ID from the configuration module 1345, retrieves the connection of the database from the database connection module 1344, executes the SQL using the JDBC interface, sequentially injects the service parameters, and returns the execution result to the upper module.
  • Database connection module 1344 When the data server 134 starts, according to the database connection information of the configuration module 1345, the database connection pool and the JDBC driver are used to connect the single or multiple databases.
  • the configuration module 1345 configures the listening port, the data service ID, the SQL, the correspondence between the data service ID and the SQL, the database connection information, the correspondence between the data service ID and the database connection information, and the SQL execution result of the data server 134 in the configuration file. And return the mapping relationship of javabean.
  • the configuration module 1345 reads all configuration information and caches it.
  • the embodiments of the present invention relate to methods and apparatus for providing highly available data services.
  • the data service is divided into a proxy client and a data server.
  • the data access logic is configured in the data server and deployed into a cluster, and the proxy client and the business application are deployed together, and the proxy client is integrated and directly invoked by the business application.
  • the proxy client automatically switches to another data server that is running normally in the cluster.
  • the invention encapsulates the database access logic by configuring the SQL, and reduces the workload of developing the data access layer; for the business application, the proxy client is directly invoked locally, and does not involve network communication, database connection, etc., and the development cost is low. It is more advantageous to provide a highly available data service solution, avoiding a single point of failure at the data service layer, and also upgrading and maintaining the data server without affecting the business application.
  • each of the foregoing modules may be implemented by software or hardware.
  • the above modules are all located in the same processor; or, the above modules are respectively located in multiple processors.
  • Embodiments of the present invention also provide a storage medium.
  • the foregoing storage medium may be configured to store program code for performing the following steps:
  • the proxy client receives a processing request sent by the service application, where the processing request is used to request processing of data in the database.
  • the proxy client determines a data server for executing a processing request, where the service application accesses the database through the proxy client and the data server;
  • the proxy client sends the processing request to the determined data server
  • the data server determined by the foregoing processes the data in the database according to the processing request
  • the determined data server sends the processing result to the proxy client.
  • the proxy client sends the received processing result to the service application.
  • the foregoing storage medium may include, but is not limited to, a USB flash drive, a Read-Only Memory (ROM), and a Random Access Memory (RAM).
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the data access logic is encapsulated into a data service system, and the proxy client in the data service system can be directly invoked by the business application, shielding the complexity of the data service, and can be represented by the proxy client.
  • the end determines the data server that executes the processing request, and the number of the data server can be more than two, thereby ensuring that when a data server is abnormal, the other data server can be used to execute the processing request to ensure the positive of the service service.
  • the impact is reduced, thereby solving the problem of the business service interruption caused by the database access logic abnormality in the related technology, thereby achieving the effect of ensuring the normal operation of the business service.

Abstract

A database processing method and apparatus. The method comprises: a proxy client receiving a processing request sent by a service application, wherein the processing request is used to request for processing of data in a database (S102); the proxy client determining a data service end used to execute the processing request, wherein the service application accesses the database via the proxy client and the data service end (S104); the proxy client sending the processing request to the determined data service end (S106); the determined data service end processing the data in the database according to the processing request (S108); the determined data service end sending a processing result to the proxy client (S110); and the proxy client sending the received processing result to the service application (S112). The method solves the problem existing in the relevant art that a service is interrupted because a database access logic is abnormal, thereby achieving the effect of ensuring the normal operation of the service.

Description

数据库处理方法及装置Database processing method and device 技术领域Technical field
本发明涉及通信领域,具体而言,涉及一种数据库处理方法及装置。The present invention relates to the field of communications, and in particular to a database processing method and apparatus.
背景技术Background technique
企业级应用软件都会有大量的数据库访问操作,在软件逻辑架构上一般会作为单独的一层即数据访问层,业务逻辑层(即,业务应用)调用数据库访问层去访问数据库中的资源,来解耦业务逻辑和数据库访问逻辑,以便将低级别的数据访问逻辑与高级别的业务逻辑分离。Enterprise application software will have a large number of database access operations. In the software logic architecture, it will generally act as a separate layer, that is, the data access layer. The business logic layer (that is, the business application) calls the database access layer to access the resources in the database. Decouple business logic and database access logic to separate low-level data access logic from high-level business logic.
但是相关技术中的访问数据库中的资源的模式会存在两个问题:However, there are two problems in the related art for accessing the patterns of resources in the database:
首先因业务逻辑(即,业务应用)是直接调用数据库访问逻辑,如果数据库访问对象因内部有缺陷或程序健壮性不高,在出现严重异常时会导致业务逻辑也崩溃掉。如果应用软件是单点部署的,整个软件服务就会中断,如果应用软件是分布式部署的,虽然其他业务节点仍能对外服务,但是整个系统的吞吐量会因少一个节点而降低。First, because the business logic (ie, business application) directly calls the database access logic, if the database access object is flawed internally or the program is not robust, the business logic will also crash when a serious exception occurs. If the application software is deployed at a single point, the entire software service will be interrupted. If the application software is distributed, although other service nodes can still serve externally, the throughput of the entire system will be reduced by one node.
其次,如果数据库访问层出现问题要修复升级,必须停止整个业务软件的运行,从而造成业务中断。Secondly, if there is a problem with the database access layer to fix the upgrade, the entire business software must be stopped, resulting in business interruption.
业界有采用面向服务的体系结构(Service-oriented Architecture,简称为SOA),把数据库访问统一以服务的形式封装成数据服务,供业务应用调用,但这种方案对原有应用业务的影响较大,首先调用方式从本地直接调用,变成了Web服务调用,对原有业务代码改造很大;其次如果数据服务出现异常或崩溃,仍会造成业务应用出现异常。因此,在相关技术中存在着由于数据库访问逻辑异常导致业务服务中断的问题。The industry has adopted a Service-oriented Architecture (SOA) to encapsulate database access into a data service in the form of a service for service application calls. However, this solution has a greater impact on the original application service. First, the calling method is directly called from the local, and becomes a Web service call, which greatly transforms the original business code. Secondly, if the data service is abnormal or crashes, the business application will still be abnormal. Therefore, there is a problem in the related art that business services are interrupted due to database access logic abnormalities.
针对相关技术中存在的由于数据库访问逻辑异常导致业务服务中断的问题,目前尚未提出有效的解决方案。In view of the problem that the business service is interrupted due to database access logic anomalies in the related art, an effective solution has not been proposed yet.
发明内容Summary of the invention
本发明提供了一种数据库处理方法及装置,以至少解决相关技术中存在的由于数据库访问逻辑异常导致业务服务中断的问题。The invention provides a database processing method and device, so as to at least solve the problem that the business service is interrupted due to database access logic abnormality existing in the related art.
根据本发明实施例的一个方面,提供了一种数据库处理方法,包括:代理客户端接收业务应用发送的处理请求,其中,上述处理请求用于请求对上述数据库中的数据进行处理;上述代理客户端确定用于执行上述处理请求的数据服务端,其中,上述业务应用通过上述代理客户端和上述数据服务端访问上述数据库;上述代理客户端将上述处理请求发送给确定的数据服务端;上述确定的数据服务端根据上述处理请求对上述数据库中的数据进行处理;上述确定的数据服务端将上述处理结果发送给上述代理客户端;上述代理客户端将接收到的上述 处理结果发送给上述业务应用。According to an aspect of the embodiments of the present invention, a database processing method includes: receiving, by a proxy client, a processing request sent by a service application, where the processing request is used to request processing of data in the database; Determining a data server for executing the foregoing processing request, wherein the service application accesses the database through the proxy client and the data server; the proxy client sends the processing request to the determined data server; The data server processes the data in the database according to the processing request; the determined data server sends the processing result to the proxy client; the proxy client receives the above The processing result is sent to the above business application.
可选地,上述代理客户端通过以下方式至少之一确定用于执行上述处理请求的数据服务端包括:上述代理客户端根据预定配置确定数据服务端;上述代理客户端根据数据服务端负荷的大小确定数据服务端,其中,上述代理客户端选择负荷最小的数据服务端。Optionally, the foregoing proxy client determines, by at least one of the following manners, that the data server for executing the foregoing processing request includes: the proxy client determines the data server according to the predetermined configuration; and the proxy client is configured according to the size of the data server load Determining a data server, wherein the proxy client selects a data server with the least load.
可选地,当上述代理客户端根据预定配置确定数据服务端后,还包括:当根据预定配置确定的数据服务端异常后,上述代理客户端选择其他的处于正常运行状态的数据服务端。Optionally, after the proxy client determines the data server according to the predetermined configuration, the method further includes: after the data server is abnormal according to the predetermined configuration, the proxy client selects another data server in a normal running state.
可选地,上述代理客户端选择其他的处于正常运行状态的数据服务端后,还包括:当上述根据预定配置确定的数据服务端恢复正常后,上述代理客户端重新选择上述根据预定配置确定的数据服务端作为执行上述处理请求的数据服务端。Optionally, after the proxy client selects another data server in a normal running state, the method further includes: after the data server determined according to the predetermined configuration returns to normal, the proxy client reselects the foregoing determining according to the predetermined configuration. The data server acts as a data server that performs the above processing request.
可选地,上述代理客户端接收上述业务应用发送的上述处理请求包括:上述代理客户端通过接口接收上述处理请求,其中,上述接口包括以下至少之一:入口参数包括服务数据的信息的接口、入口参数数据库访问请求的接口,上述服务数据的信息用于指示上述业务应用需要处理的数据。Optionally, the receiving, by the proxy client, the foregoing processing request sent by the service application, the proxy client receiving the processing request by using an interface, where the interface includes at least one of the following: an interface of an entry parameter including information of service data, The interface of the access parameter database access request, the information of the service data is used to indicate the data that the service application needs to process.
可选地,上述接口为本地接口。Optionally, the above interface is a local interface.
可选地,上述代理客户端将上述处理请求发送给确定的数据服务端包括:上述代理客户端按照预定通讯协议将上述处理请求编码成请求报文;上述代理客户端将上述请求报文发送给上述确定的数据服务端。Optionally, the proxy client sending the processing request to the determined data server includes: the proxy client encoding the processing request into a request packet according to a predetermined communication protocol; and the proxy client sending the request packet to the request packet The data server identified above.
可选地,上述确定的数据服务端将上述处理结果发送给上述代理客户端包括:上述数据服务端按照预定通讯协议将上述处理结果返回给上述代理客户端。Optionally, the foregoing determined data server sends the foregoing processing result to the proxy client, where the data server returns the processing result to the proxy client according to a predetermined communication protocol.
根据本发明实施例的另一方面,提供了一种数据库处理装置,包括:接收模块,上述接收模块应用于代理客户端中,设置为接收业务应用发送的处理请求,其中,上述处理请求用于请求对上述数据库中的数据进行处理;确定模块,上述确定模块应用于代理客户端中,设置为确定用于执行上述处理请求的数据服务端,其中,上述业务应用通过上述代理客户端和上述数据服务端访问上述数据库;第一发送模块,上述第一发送模块应用于代理客户端中,设置为将上述处理请求发送给确定的数据服务端;处理模块,上述处理模块应用于确定的数据服务端中,设置为根据上述处理请求对上述数据库中的数据进行处理;第二发送模块,上述第二发送模块应用于确定的数据服务端中,设置为将上述处理结果发送给上述代理客户端;第三发送模块,上述第三发送模块应用于代理客户端中,设置为将接收到的上述处理结果发送给上述业务应用。According to another aspect of the present invention, a database processing apparatus is provided, including: a receiving module, wherein the receiving module is applied to a proxy client, and is configured to receive a processing request sent by a service application, where the processing request is used for Requesting to process data in the foregoing database; determining a module, wherein the determining module is applied to the proxy client, and is configured to determine a data server for executing the processing request, wherein the service application passes the proxy client and the foregoing data The server accesses the database; the first sending module, the first sending module is applied to the proxy client, and is configured to send the processing request to the determined data server; the processing module, the processing module is applied to the determined data server The second sending module is configured to apply the processing result to the proxy client, where the second sending module is applied to the determined data server. Three transmission module, the above third transmission mode Applied to the agent client, transmits to the service application is provided above the processing result received.
可选地,上述确定模块包括:第一确定单元,设置为根据预定配置确定数据服务端;第二确定单元,设置为根据数据服务端负荷的大小确定数据服务端,其中,上述代理客户端选择负荷最小的数据服务端。Optionally, the determining module includes: a first determining unit, configured to determine a data server according to a predetermined configuration; and a second determining unit, configured to determine a data server according to a size of a data server load, where the proxy client selects The least loaded data server.
可选地,上述确定模块还包括:第一选择单元,设置为当根据预定配置确定的数据服务 端异常后,选择其他的处于正常运行状态的数据服务端。Optionally, the determining module further includes: a first selecting unit, configured to be a data service determined according to a predetermined configuration. After the terminal is abnormal, select another data server that is in normal operation.
可选地,上述确定模块还包括:第二选择单元,设置为当上述根据预定配置确定的数据服务端恢复正常后,重新选择上述根据预定配置确定的数据服务端作为执行上述处理请求的数据服务端。Optionally, the determining module further includes: a second selecting unit, configured to reselect the data server determined according to the predetermined configuration as the data service for executing the processing request after the data server determined according to the predetermined configuration returns to normal end.
可选地,上述接收模块包括:接收单元,设置为通过接口接收上述处理请求,其中,上述接口包括以下至少之一:入口参数包括服务数据的信息的接口、入口参数数据库访问请求的接口,上述服务数据的信息用于指示上述业务应用需要处理的数据。Optionally, the receiving module includes: a receiving unit, configured to receive the processing request by using an interface, where the interface includes at least one of the following: an interface that includes information of service data, an interface of an access parameter database access request, and the foregoing The information of the service data is used to indicate the data that the above business application needs to process.
可选地,上述接口为本地接口。Optionally, the above interface is a local interface.
可选地,上述第一发送模块包括:编码单元,设置为按照预定通讯协议将上述处理请求编码成请求报文;发送单元,设置为将上述请求报文发送给上述确定的数据服务端。Optionally, the first sending module includes: an encoding unit configured to encode the processing request into a request message according to a predetermined communication protocol; and the sending unit is configured to send the request message to the determined data server.
可选地,上述第二发送模块包括:返回单元,设置为按照预定通讯协议将上述处理结果返回给上述代理客户端。Optionally, the foregoing second sending module includes: a returning unit, configured to return the processing result to the proxy client according to a predetermined communication protocol.
通过本发明实施例,采用代理客户端接收业务应用发送的处理请求,其中,上述处理请求用于请求对上述数据库中的数据进行处理;上述代理客户端确定用于执行上述处理请求的数据服务端,其中,上述业务应用通过上述代理客户端和上述数据服务端访问上述数据库;上述代理客户端将上述处理请求发送给确定的数据服务端;上述确定的数据服务端根据上述处理请求对上述数据库中的数据进行处理;上述确定的数据服务端将上述处理结果发送给上述代理客户端;上述代理客户端将接收到的上述处理结果发送给所述业务应用。从而实现了将数据访问逻辑封装成数据服务系统,并且,该数据服务系统中的代理客户端能够被业务应用直接调用,屏蔽了数据服务的复杂性,并且,可以由代理客户端确定执行处理请求的数据服务端,而该数据服务端的数量可以为两个以上,从而保证了当一个数据服务端异常后,可以使用其他的数据服务端执行处理请求,保证业务服务的正常进行,降低影响,从而解决了相关技术中存在的由于数据库访问逻辑异常导致业务服务中断的问题,进而达到了保证业务服务正常进行的效果。According to the embodiment of the present invention, the proxy client receives a processing request sent by the service application, where the processing request is used to request processing of data in the database; and the proxy client determines a data server for executing the processing request. The service application accesses the database through the proxy client and the data server; the proxy client sends the processing request to the determined data server; and the determined data server performs the request in the database according to the processing request. The data is processed; the determined data server sends the processing result to the proxy client; and the proxy client sends the received processing result to the service application. Thereby, the data access logic is encapsulated into a data service system, and the proxy client in the data service system can be directly called by the business application, shielding the complexity of the data service, and the execution request can be determined by the proxy client. Data server, and the number of data servers can be more than two, thus ensuring that when a data server is abnormal, other data servers can be used to execute processing requests to ensure normal operation of the service and reduce the impact. The problem that the business service is interrupted due to the database access logic abnormality existing in the related art is solved, thereby achieving the effect of ensuring the normal operation of the service service.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的数据库处理方法的流程图;1 is a flow chart of a database processing method according to an embodiment of the present invention;
图2是根据本发明实施例的数据库处理装置的结构框图;2 is a block diagram showing the structure of a database processing apparatus according to an embodiment of the present invention;
图3是根据本发明实施例的数据库处理装置中确定模块24的结构框图;FIG. 3 is a structural block diagram of a determining module 24 in a database processing apparatus according to an embodiment of the present invention; FIG.
图4是根据本发明实施例的数据库处理装置中确定模块24的优选结构框图一; 4 is a block diagram 1 of a preferred structure of the determining module 24 in the database processing apparatus according to an embodiment of the present invention;
图5是根据本发明实施例的数据库处理装置中确定模块24的优选结构框图二;5 is a block diagram 2 of a preferred structure of the determining module 24 in the database processing apparatus according to an embodiment of the present invention;
图6是根据本发明实施例的数据库处理装置中接收模块22的结构框图;FIG. 6 is a structural block diagram of a receiving module 22 in a database processing apparatus according to an embodiment of the present invention;
图7是根据本发明实施例的数据库处理装置中第一发送模块26的结构框图;FIG. 7 is a structural block diagram of a first transmitting module 26 in a database processing apparatus according to an embodiment of the present invention;
图8是根据本发明实施例的数据库处理装置中第二发送模块210的结构框图;FIG. 8 is a structural block diagram of a second sending module 210 in a database processing apparatus according to an embodiment of the present invention;
图9是根据本发明实施例的业务应用调用数据服务的基本流程示意图;9 is a schematic diagram showing a basic flow of a service application calling data service according to an embodiment of the present invention;
图10是根据本发明实施例的通讯流程示意图;FIG. 10 is a schematic diagram of a communication flow according to an embodiment of the present invention; FIG.
图11是根据本发明实施例的单机应用场景时数据服务系统的结构示意图;11 is a schematic structural diagram of a data service system when a single application scenario is performed according to an embodiment of the present invention;
图12是根据本发明实施例的分布式应用场景时数据服务系统的结构示意图;FIG. 12 is a schematic structural diagram of a data service system in a distributed application scenario according to an embodiment of the present invention; FIG.
图13是根据本发明实施例的数据服务系统的模块结构框图。FIG. 13 is a block diagram showing the structure of a data service system according to an embodiment of the present invention.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It is to be understood that the terms "first", "second" and the like in the specification and claims of the present invention are used to distinguish similar objects, and are not necessarily used to describe a particular order or order.
在本实施例中提供了一种数据库处理方法,图1是根据本发明实施例的数据库处理方法的流程图,如图1所示,该流程包括如下步骤:In this embodiment, a database processing method is provided. FIG. 1 is a flowchart of a database processing method according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
步骤S102,代理客户端接收业务应用发送的处理请求,其中,该处理请求用于请求对数据库中的数据进行处理;Step S102, the proxy client receives a processing request sent by the service application, where the processing request is used to request processing of data in the database;
步骤S104,该代理客户端确定用于执行处理请求的数据服务端,其中,该业务应用通过代理客户端和数据服务端访问数据库;Step S104, the proxy client determines a data server for executing a processing request, wherein the service application accesses the database through the proxy client and the data server;
步骤S106,该代理客户端将处理请求发送给确定的数据服务端;Step S106, the proxy client sends the processing request to the determined data server;
步骤S108,上述确定的数据服务端根据处理请求对数据库中的数据进行处理;Step S108, the determined data server processes the data in the database according to the processing request;
步骤S110,上述确定的数据服务端将处理结果发送给代理客户端;Step S110, the determined data server sends the processing result to the proxy client.
步骤S112,上述代理客户端将接收到的处理结果发送给业务应用。Step S112, the proxy client sends the received processing result to the service application.
在本实施例中,将数据访问逻辑封装成数据服务系统,数据服务系统分为代理客户端和数据服务端,代理客户端被业务应用集成并直接调用,代理客户端和数据服务端之间可以通过网络通讯。通过上述步骤,实现了数据服务系统中的代理客户端能够被业务应用直接调用,屏蔽了数据服务的复杂性,并且,可以由代理客户端确定执行处理请求的数据服务端,而该数据服务端的数量可以为两个以上,从而保证了当一个数据服务端异常后,可以使用其他的 数据服务端执行处理请求,保证业务服务的正常进行,降低影响,从而解决了相关技术中存在的由于数据库访问逻辑异常导致业务服务中断的问题,进而达到了保证业务服务正常进行的效果。In this embodiment, the data access logic is encapsulated into a data service system, and the data service system is divided into a proxy client and a data server. The proxy client is integrated and directly invoked by the business application, and the proxy client and the data server can be Communicate via the network. Through the above steps, the proxy client in the data service system can be directly called by the business application, shielding the complexity of the data service, and the data server executing the processing request can be determined by the proxy client, and the data server is The number can be more than two, which ensures that when a data server is abnormal, other can be used. The data server executes the processing request to ensure the normal operation of the service and reduces the impact, thereby solving the problem that the service service is interrupted due to the database access logic abnormality in the related technology, thereby achieving the effect of ensuring the normal operation of the service service.
在一个可选的实施例中,上述代理客户端可以通过以下方式至少之一确定用于执行处理请求的数据服务端:代理客户端根据预定配置确定数据服务端;该代理客户端根据数据服务端负荷的大小确定数据服务端,其中,代理客户端选择负荷最小的数据服务端。由此可知,当代理客户端确定数据服务端时,可以有多种确定方式,一种方式是,根据预定配置确定数据服务端,即,每个代理客户端都可以有预先配置的数据服务端,该预先配置的数据服务端即为默认配置的数据服务端,其中,默认配置的数据服务端可以是一个或多个,代理客户端可以利用该默认配置的数据服务对数据库进行相应的处理。另外一种方式时,当代理客户端没有默认配置的数据服务端时,该代理客户端可以根据预定的规则选择数据服务端,该预定的规则可以有多种,例如,可以选择负荷最小的数据服务端,可以选择处理能力最强的数据服务端,也可以随机选择处于空闲状态的数据服务端。当然,上述的确定数据服务端的方式仅仅是一种示例,确定数据服务端的方式并不仅仅限于上述的方式。In an optional embodiment, the proxy client may determine, by at least one of the following methods, a data server for executing a processing request: the proxy client determines a data server according to a predetermined configuration; and the proxy client is configured according to the data server. The size of the load determines the data server, where the proxy client selects the data server with the least load. Therefore, when the proxy client determines the data server, there may be multiple determination manners. One way is to determine the data server according to the predetermined configuration, that is, each proxy client may have a pre-configured data server. The pre-configured data server is the default configured data server. The default configured data server can be one or more. The proxy client can use the default configured data service to process the database accordingly. In another mode, when the proxy client does not have a data server configured by default, the proxy client may select a data server according to a predetermined rule, and the predetermined rule may have multiple types, for example, the data with the smallest load may be selected. The server can select the data server with the strongest processing capability, or randomly select the data server in the idle state. Of course, the above manner of determining the data server is only an example, and the manner of determining the data server is not limited to the above manner.
从上述的实施例可知,代理客户端可以根据预定配置确定数据服务端,在实际应用中,该根据预定配置确定的数据服务端可能会出现异常,当该根据预定配置确定的数据服务端出现异常后,代理客户端需要选择其他的用于执行处理请求的数据服务端,在一个可选的实施例中,当根据预定配置确定的数据服务端异常后,该代理客户端选择其他的处于正常运行状态的数据服务端。在选择其他的数据服务端时,选择的原则可以同上述的实施例中的预定的规则一致,即可以选择负荷最小的数据服务端,可以选择处理能力最强的数据服务端,也可以随机选择处于空闲状态的数据服务端,当然,也可以有其他的选择方法,如代理客户端按预定顺序轮询其他的数据服务端,发现空闲且能够正常工作的数据服务端后,便选择该空闲且能够正常工作的数据服务端。由于数据服务端可以执行处理请求,因此,数据服务端中封装了数据库访问逻辑,单独部署,数据服务端可以和一个或多个数据库建立并保持数据库连接;并且,数据服务端的数量可以为两个或更多,多个数据服务端可以组成一个集群。在确定数据服务端异常时,可以有多种确定方式,例如当数据服务端的心跳异常,或者网络中断。It can be seen from the foregoing embodiment that the proxy client can determine the data server according to the predetermined configuration. In an actual application, the data server determined according to the predetermined configuration may be abnormal, and the data server determined according to the predetermined configuration is abnormal. After that, the proxy client needs to select another data server for executing the processing request. In an optional embodiment, after the data server is abnormal according to the predetermined configuration, the proxy client selects other normal operations. The status of the data server. When selecting other data server, the selection principle can be consistent with the predetermined rule in the above embodiment, that is, the data server with the least load can be selected, and the data server with the strongest processing capability can be selected, or can be randomly selected. In the idle data server, of course, there may be other selection methods. For example, if the proxy client polls other data servers in a predetermined order, and finds the idle and working data server, the idle and A data server that works fine. Since the data server can execute the processing request, the data server encapsulates the database access logic and is deployed separately. The data server can establish and maintain a database connection with one or more databases; and the number of data servers can be two. Or more, multiple data servers can form a cluster. When determining the abnormality of the data server, there may be various determination methods, such as when the data server is abnormal in heartbeat or the network is interrupted.
在一个可选的实施例中,当上述代理客户端选择其他的处于正常运行状态的数据服务端后,还包括:当上述根据预定配置确定的数据服务端恢复正常后,该代理客户端重新选择该根据预定配置确定的数据服务端作为执行处理请求的数据服务端。从而保证不长期占用其他代理客户端连接的数据服务端。In an optional embodiment, after the proxy client selects another data server in a normal running state, the method further includes: when the data server determined according to the predetermined configuration returns to normal, the proxy client reselects The data server determined according to the predetermined configuration is used as a data server that executes the processing request. Therefore, it is guaranteed that the data server connected to other proxy clients is not occupied for a long time.
在一个可选的实施例中,代理客户端接收业务应用发送的处理请求包括:该代理客户端通过接口接收处理请求,其中,该接口包括以下至少之一:入口参数包括服务数据的信息的接口、入口参数数据库访问请求的接口,该服务数据的信息用于指示业务应用需要处理的数据。上述的服务数据的信息可以包括唯一标识的数据服务ID和业务参数,该业务参数可以是查询条件,也可以是需要插入数据库的业务数据等;上述的入口参数数据库访问请求可以是标准的结构化查询语言(Structured Query Language,简称为SQL)。 In an optional embodiment, the receiving, by the proxy client, the processing request sent by the service application comprises: the proxy client receiving the processing request through the interface, wherein the interface comprises at least one of the following: the interface of the entry parameter including the information of the service data The interface of the access parameter database access request, the information of the service data is used to indicate data that the service application needs to process. The information of the foregoing service data may include a uniquely identified data service ID and a service parameter, and the service parameter may be a query condition, or may be a service data that needs to be inserted into a database, etc.; the above-mentioned entry parameter database access request may be a standard structured Query Language (SQL).
在一个可选的实施例中,上述的接口可以为本地接口,即业务应用是以本地接口的方式调用代理客户端。In an optional embodiment, the foregoing interface may be a local interface, that is, the service application invokes the proxy client in a local interface manner.
在一个可选的实施例中,当上述的代理客户端将处理请求发送给确定的数据服务端时,可以首先按照预定通讯协议将该处理请求编码成请求报文;再将请求报文发送给上述确定的数据服务端。In an optional embodiment, when the proxy client sends the processing request to the determined data server, the processing request may first be encoded into the request message according to the predetermined communication protocol; and then the request message is sent to the request message. The data server identified above.
在一个可选的实施例中,数据服务端在接收到代理客户端发送的处理请求后,可以根据事先配置好的数据库连接信息和数据服务逻辑,转换成SQL访问对应的数据库进行数据库操作或者直接转发数据库访问请求;并按照内部通讯协议将数据库操作结果返回给代理客户端,其中,数据服务端在返回操作结果时,可以是以响应报文的方式返回操作结果。代理客户端可以获取并解析数据服务端返回的响应报文,把响应结果返回给业务应用。In an optional embodiment, after receiving the processing request sent by the proxy client, the data server may convert the database into the SQL access database for database operation or directly according to the previously configured database connection information and data service logic. Forwarding the database access request; and returning the database operation result to the proxy client according to the internal communication protocol, wherein the data server returns the operation result in the manner of the response message when returning the operation result. The proxy client can obtain and parse the response packet returned by the data server, and return the response result to the service application.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例中的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation. Based on such understanding, the technical solution of the present invention in essence or the contribution to the related art can be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, CD-ROM). The instructions include a number of instructions for causing a terminal device (which may be a cell phone, computer, server, or network device, etc.) to perform the methods of various embodiments of the present invention.
在本实施例中还提供了一种数据库处理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In the embodiment, a database processing device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图2是根据本发明实施例的数据库处理装置的结构框图,如图2所示,该装置包括接收模块22、确定模块24、第一发送模块26、处理模块28、第二发送模块210和第三发送模块212,其中,接收模块22、确定模块24、第一发送模块26和第三发送模块212应用于代理客户端中,处理模块28和第二发送模块210应用于数据服务端中。下面对该装置进行说明:2 is a structural block diagram of a database processing apparatus according to an embodiment of the present invention. As shown in FIG. 2, the apparatus includes a receiving module 22, a determining module 24, a first sending module 26, a processing module 28, a second sending module 210, and a The three sending module 212, wherein the receiving module 22, the determining module 24, the first sending module 26, and the third sending module 212 are applied to the proxy client, and the processing module 28 and the second sending module 210 are applied to the data server. The device is described below:
接收模块22,设置为接收业务应用发送的处理请求,其中,该处理请求用于请求对数据库中的数据进行处理;确定模块24,设置为确定用于执行处理请求的数据服务端,其中,该业务应用通过代理客户端和数据服务端访问数据库;第一发送模块26,设置为将处理请求发送给确定的数据服务端;处理模块28,设置为根据处理请求对数据库中的数据进行处理;第二发送模块210,设置为将处理结果发送给代理客户端;第三发送模块212,设置为将接收到的处理结果发送给业务应用。The receiving module 22 is configured to receive a processing request sent by the service application, where the processing request is used to request processing of data in the database; and the determining module 24 is configured to determine a data server for executing the processing request, where The service application accesses the database through the proxy client and the data server; the first sending module 26 is configured to send the processing request to the determined data server; the processing module 28 is configured to process the data in the database according to the processing request; The second sending module 210 is configured to send the processing result to the proxy client, and the third sending module 212 is configured to send the received processing result to the service application.
图3是根据本发明实施例的数据库处理装置中确定模块24的结构框图,如图3所示,该确定模块24包括第一确定单元32和第二确定单元34,下面对该确定模块24进行说明:FIG. 3 is a structural block diagram of a determining module 24 in a database processing apparatus according to an embodiment of the present invention. As shown in FIG. 3, the determining module 24 includes a first determining unit 32 and a second determining unit 34, and the determining module 24 is provided below. Be explained:
第一确定单元32,设置为根据预定配置确定数据服务端;第二确定单元34,设置为根据数据服务端负荷的大小确定数据服务端,其中,该代理客户端选择负荷最小的数据服务端。 The first determining unit 32 is configured to determine the data server according to the predetermined configuration; the second determining unit 34 is configured to determine the data server according to the size of the data server load, wherein the proxy client selects the data server with the least load.
图4是根据本发明实施例的数据库处理装置中确定模块24的优选结构框图一,如图4所示,该确定模块24除包括图3所示的单元外,还包括第一选择单元42,下面对该确定模块24进行说明。4 is a block diagram of a preferred structure of the determining module 24 in the database processing apparatus according to the embodiment of the present invention. As shown in FIG. 4, the determining module 24 includes a first selecting unit 42 in addition to the unit shown in FIG. The determination module 24 will be described below.
第一选择单元42,连接至上述第一确定单元32,设置为当根据预定配置确定的数据服务端异常后,选择其他的处于正常运行状态的数据服务端。The first selecting unit 42 is connected to the first determining unit 32, and is configured to select another data server in a normal running state after the data server terminal determined according to the predetermined configuration is abnormal.
图5是根据本发明实施例的数据库处理装置中确定模块24的优选结构框图二,如图5所示,该确定模块24除包括图4所示的单元外,还包括第二选择单元52,下面对该确定模块24进行说明。FIG. 5 is a block diagram of a preferred structure of the determining module 24 in the database processing apparatus according to the embodiment of the present invention. As shown in FIG. 5, the determining module 24 includes a second selecting unit 52 in addition to the unit shown in FIG. The determination module 24 will be described below.
第二选择单元52,连接至上述第一选择单元42,设置为当根据预定配置确定的数据服务端恢复正常后,重新选择该根据预定配置确定的数据服务端作为执行上述处理请求的数据服务端。The second selecting unit 52 is connected to the first selecting unit 42 and configured to reselect the data server determined according to the predetermined configuration as the data server performing the processing request after the data server determined according to the predetermined configuration returns to normal. .
图6是根据本发明实施例的数据库处理装置中接收模块22的结构框图,如图6所示,该接收模块22包括接收单元62,下面对该接收单元62进行说明。FIG. 6 is a structural block diagram of a receiving module 22 in a database processing apparatus according to an embodiment of the present invention. As shown in FIG. 6, the receiving module 22 includes a receiving unit 62, and the receiving unit 62 will be described below.
接收单元62,设置为通过接口接收处理请求,其中,该接口包括以下至少之一:入口参数包括服务数据的信息的接口、入口参数数据库访问请求的接口,该服务数据的信息用于指示上述业务应用需要处理的数据。The receiving unit 62 is configured to receive a processing request by using an interface, where the interface includes at least one of the following: an interface that includes information of service data, an interface of an access parameter database access request, and information of the service data is used to indicate the foregoing service. Apply the data that needs to be processed.
在一个可选的实施例中,上述接口为本地接口。In an optional embodiment, the above interface is a local interface.
图7是根据本发明实施例的数据库处理装置中第一发送模块26的结构框图,如图7所示,该第一发送模块26包括编码单元72和发送单元74,下面对该第一发送模块26进行说明。FIG. 7 is a structural block diagram of a first sending module 26 in a database processing apparatus according to an embodiment of the present invention. As shown in FIG. 7, the first transmitting module 26 includes an encoding unit 72 and a transmitting unit 74, and the first sending is performed below. Module 26 is described.
编码单元72,设置为按照预定通讯协议将处理请求编码成请求报文;发送单元74,连接至上述编码单元72,设置为将请求报文发送给确定的数据服务端。The encoding unit 72 is configured to encode the processing request into the request message according to a predetermined communication protocol; the transmitting unit 74 is connected to the encoding unit 72, and is configured to send the request message to the determined data server.
图8是根据本发明实施例的数据库处理装置中第二发送模块210的结构框图,如图8所示,该第二发送模块210包括返回单元82,下面对该返回单元82进行说明。FIG. 8 is a structural block diagram of a second sending module 210 in a database processing apparatus according to an embodiment of the present invention. As shown in FIG. 8, the second sending module 210 includes a returning unit 82, which is described below.
返回单元82,设置为按照预定通讯协议将处理结果返回给代理客户端。Returning unit 82 is arranged to return the processing result to the proxy client in accordance with a predetermined communication protocol.
下面以上述的服务数据的信息为数据服务ID和业务参数,上述的入口参数数据库访问请求为SQL为例,对本发明进行说明:The following takes the information of the service data as the data service ID and the service parameter, and the above-mentioned entry parameter database access request is an example of the SQL, and the present invention is described:
图9是根据本发明实施例的业务应用调用数据服务的基本流程示意图,如图9所示,该流程包括如下步骤:FIG. 9 is a schematic diagram of a basic process of invoking a data service by a service application according to an embodiment of the present invention. As shown in FIG. 9, the process includes the following steps:
步骤S902,业务应用本地调用代理客户端里的接口,传入数据服务ID和业务参数。Step S902, the service application locally invokes an interface in the proxy client, and transmits the data service ID and the service parameter.
步骤S904,代理客户端把数据服务ID和业务参数编码成请求报文后,发送给数据服务端。Step S904, the proxy client encodes the data service ID and the service parameter into a request message, and then sends the data message to the data server.
步骤S906,数据服务端接收到代理客户端发来的请求报文后,解码出数据服务ID和业务 参数,根据配置转换成标准SQL,并通过数据库连接(Java DataBase Connectivity Java,简称为JDBC)或开放数据库互联(Open DataBase Connectivity,简称为ODBC)访问数据库执行SQL,把SQL执行结果编码成响应报文发送给代理客户端。Step S906, after receiving the request message sent by the proxy client, the data server decodes the data service ID and the service. Parameters, converted to standard SQL according to the configuration, and access to the database through the database connection (Java DataBase Connectivity Java, JDBC for short) or Open DataBase Connectivity (ODBC) to execute the SQL, the SQL execution results are encoded into response messages Send to the proxy client.
步骤S908,代理客户端接收到数据服务端发送的响应报文,解码出SQL执行结果返回给业务应用。Step S908, the proxy client receives the response packet sent by the data server, and decodes the SQL execution result and returns the result to the service application.
通过该实施例,把数据访问逻辑封装成数据服务系统,并且数据服务系统分为代理客户端和数据服务端,代理客户端被业务软件集成并直接调用,屏蔽了数据服务的复杂性。数据服务端部署成集群,当代理客户端连接的数据服务端出现异常时,或数据服务端停机升级时,代理客户端自动切换到集群内其他运行正常的数据服务端,从而对业务应用没有任何影响。Through this embodiment, the data access logic is encapsulated into a data service system, and the data service system is divided into a proxy client and a data server. The proxy client is integrated and directly invoked by the business software, shielding the complexity of the data service. The data server is deployed in a cluster. When the data server connected to the proxy client is abnormal, or the data server is downgraded, the proxy client automatically switches to other normal data servers in the cluster, so that there is no business application. influences.
下面对Java语言场景下的数据服务系统的通讯流程和基本处理流程进行说明:The following describes the communication flow and basic processing flow of the data service system in the Java language scenario:
图10是根据本发明实施例的通讯流程示意图,如图10所示,该流程包括如下步骤:FIG. 10 is a schematic diagram of a communication process according to an embodiment of the present invention. As shown in FIG. 10, the process includes the following steps:
步骤S1002,当业务应用需要访问数据库时,调用代理客户端统一的java接口,入参为唯一标识的数据服务ID以及业务参数,例如查询条件或插入的业务数据等。In step S1002, when the business application needs to access the database, the unified java interface of the proxy client is invoked, and the data service ID and the service parameter, such as the query condition or the inserted service data, are uniquely identified.
步骤S1004,代理客户端把上述参数按照内部协议编码成请求报文,发送给默认连接的数据服务端(同上述的根据预定配置确定的数据服务端)。In step S1004, the proxy client encodes the above parameters into a request message according to an internal protocol, and sends the request to the data server of the default connection (the data server determined according to the predetermined configuration as described above).
步骤S1006,数据服务端接收到数据服务请求报文后,首先解码请求,取出请求中的数据服务ID和业务参数,在自身的数据服务配置中查找对应数据服务ID的相关配置,包括数据库连接信息、数据服务对应的SQL、和java对象的映射关系等,通过数据库连接信息从数据库连接池中取出该数据库的连接,通过JDBC驱动执行SQL和业务参数。Step S1006: After receiving the data service request message, the data server first decodes the request, extracts the data service ID and the service parameter in the request, and searches for a corresponding configuration of the corresponding data service ID in the data service configuration, including the database connection information. The mapping between the SQL corresponding to the data service and the Java object, etc., the connection of the database is taken out from the database connection pool through the database connection information, and the SQL and business parameters are executed through the JDBC driver.
步骤S1008,数据服务端获取数据库返回的SQL执行结果。In step S1008, the data server obtains the SQL execution result returned by the database.
步骤S1010,数据服务端把数据库返回的SQL执行结果以内部协议编码成响应报文,发给代理客户端。In step S1010, the data server encodes the SQL execution result returned by the database into a response message by using an internal protocol, and sends the response message to the proxy client.
步骤S1012,代理客户端收到响应报文后,解码出SQL执行结果,并根据该数据服务和java对象的映射关系配置,把SQL执行结果反序列化成java对象,返回给业务应用。Step S1012: After receiving the response message, the proxy client decodes the SQL execution result, and according to the mapping relationship between the data service and the java object, the SQL execution result is deserialized into a java object and returned to the service application.
业务应用无论是单机单节点应用,还是部署成多节点的分布式应用,都可以采用本发明的数据服务方法。The data service method of the present invention can be applied to a business application whether it is a single-node single-node application or a distributed application deployed as a multi-node.
图11是根据本发明实施例的单机应用场景时数据服务系统的结构示意图,如图11所示,当业务应用为单机单节点时,数据服务需要有一个代理客户端被业务应用集成,部署两个或更多的数据服务端作为一个集群,代理客户端配置了集群里所有的数据服务端连接信息,连接信息包括数据服务端IP和监听端口等。应用启动前需要先启动所有的数据服务端,启动应用时,代理客户端连接上配置的默认的数据服务端(同上述的根据预定配置确定的数据服务端),通过此数据服务端提供数据服务。如果代理客户端检测到默认的数据服务端出现异常,则轮询集群中下一个数据服务端进行连接,连接成功后使用新的数据服务端给业务应用提供 数据服务。11 is a schematic structural diagram of a data service system when a single-application application scenario is performed according to an embodiment of the present invention. As shown in FIG. 11, when a service application is a single-node single node, a data service needs to have a proxy client integrated by a service application, and two deployments are performed. One or more data servers are used as a cluster. The proxy client configures all data server connection information in the cluster. The connection information includes the data server IP and the listening port. Before starting the application, all the data servers need to be started. When the application is started, the default data server configured on the proxy client connection (the same data server as determined according to the predetermined configuration) is provided, and the data server is provided through the data server. . If the proxy client detects an abnormality in the default data server, polls the next data server in the cluster to connect. After the connection is successful, the new data server is used to provide the service application. data service.
图12是根据本发明实施例的分布式应用场景时数据服务系统的结构示意图,如图12所示,当业务应用为多节点分布式部署场景时,基本和单节点业务应用类似,区别是每个节点的业务应用集成一个代理客户端,为每个业务应用部署一个数据服务端,每个业务应用的代理客户端配置默认连接的是自己的数据服务端(即,每个业务应用的代理客户端连接的是根据预定配置确定的数据服务端),所有的数据服务端组成一个集群。每个节点的应用启动时,代理客户端连接默认的数据服务端。当某个业务应用的代理客户端连接的数据服务端出现异常时,该代理客户端轮询集群中下一个数据服务端进行连接,连接成功后使用新的数据服务端给业务应用提供数据服务,同时该代理客户端定时检测默认的数据服务端是否恢复正常,如果恢复正常则中断非默认的数据服务端的所有连接,重新连接默认的数据服务端并提供数据服务。以确保不长期占用其他节点的数据服务端。FIG. 12 is a schematic structural diagram of a data service system in a distributed application scenario according to an embodiment of the present invention. As shown in FIG. 12, when a service application is a multi-node distributed deployment scenario, the basic application is similar to a single-node service application, and the difference is that each The business application of each node integrates a proxy client, and deploys a data server for each business application. The proxy client configuration of each business application is connected by default to its own data server (ie, the proxy client of each business application). The end connection is a data server determined according to a predetermined configuration, and all data servers form a cluster. When the application of each node starts, the proxy client connects to the default data server. When an abnormality occurs in the data server connected to the proxy client of a business application, the proxy client polls the next data server in the cluster to connect, and uses the new data server to provide data services to the business application after the connection is successful. At the same time, the proxy client periodically checks whether the default data server is restored to normal. If it returns to normal, all connections of the non-default data server are interrupted, the default data server is reconnected, and the data service is provided. To ensure that the data server of other nodes is not occupied for a long time.
图13是根据本发明实施例的数据服务系统的模块结构框图,如图13所示,该系统包括两大组件:代理客户端132和数据服务端134,以下分别说明两大组件的各个模块:FIG. 13 is a block diagram showing the structure of a data service system according to an embodiment of the present invention. As shown in FIG. 13, the system includes two major components: a proxy client 132 and a data server 134. The following respectively describe the modules of the two major components:
代理客户端132中包括应用接口层1321和代理客户端通讯模块1322,下面对该应用接口层1321和代理客户端通讯模块1322进行说明:The proxy client 132 includes an application interface layer 1321 and a proxy client communication module 1322. The application interface layer 1321 and the proxy client communication module 1322 are described below:
应用接口层1321:Application interface layer 1321:
根据执行SQL类型的不通,接口分为以下两类:According to the implementation of SQL type, the interface is divided into the following two categories:
1)数据查询接口:入参为数据服务ID、参数集合,返回值类型为集合对象,集合中每个元素是javabean对象,对应数据查询的一行记录。数据查询返回的字段和javabean属性的映射关系由代理客户端通讯模块从数据服务端获取。适用于调用封装了数据查询语言的数据服务,如SELECT语句。1) Data query interface: the input parameter is the data service ID and parameter set, and the return value type is a collection object. Each element in the set is a javabean object, corresponding to a row of records of the data query. The mapping relationship between the field returned by the data query and the javabean attribute is obtained by the proxy client communication module from the data server. Applicable to call data services that encapsulate the data query language, such as SELECT statements.
2)数据操纵接口:入参为数据服务ID、参数,返回值为受影响的行数。2) Data manipulation interface: the input parameter is the data service ID and parameters, and the return value is the number of affected rows.
适用于调用封装了数据操纵语言的数据服务,如INSERT、UPDATE、DELETE语句。Applicable to call data services that encapsulate the data manipulation language, such as INSERT, UPDATE, DELETE statements.
根据不同业务的需求,可以定制化提供更多类型的接口。According to the needs of different businesses, more types of interfaces can be customized.
代理客户端通讯模块1322:Proxy client communication module 1322:
代理客户端132启动时,代理客户端通讯模块1322从配置文件中读取默认的数据服务端(同上述的根据预定配置确定的数据服务端)连接信息和集群中其他的数据服务端连接信息,连接默认的数据服务端134,并通过内部协议从数据服务端134获取SQL执行结果和返回javabean的映射关系。当业务应用调用代理客户端接口时,该代理客户端通讯模块1322把接口入参的数据服务ID和业务参数按照JSON格式编码成请求报文,发送给连接的数据服务端134,并阻塞接收返回响应报文或者超时。接收到响应报文后,解码出响应结果,供应用接口层根据不同的接口类型封装成java对象,返回给业务应用。When the proxy client 132 is started, the proxy client communication module 1322 reads the default data server (the same data server determined according to the predetermined configuration) connection information and other data server connection information in the cluster from the configuration file. The default data server 134 is connected, and the mapping between the SQL execution result and the return javabean is obtained from the data server 134 through an internal protocol. When the service application invokes the proxy client interface, the proxy client communication module 1322 encodes the data service ID and the service parameter of the interface into the parameter into a request message according to the JSON format, and sends the data to the connected data server 134, and blocks the reception and return. Response message or timeout. After receiving the response message, the response result is decoded, and the supply interface layer is encapsulated into a java object according to different interface types, and returned to the service application.
数据服务端134异常时,代理客户端通讯模块1322轮询连接所配置的所有数据服务端, 如果能正常连接则使用该数据服务端。When the data server 134 is abnormal, the proxy client communication module 1322 polls all data servers configured for the connection. Use this data server if it can connect properly.
如果在分布式应用部署场景下,代理客户端通讯模块1322定时检测默认的数据服务端134是否恢复正常,如果连恢复正常则断开正连接的数据服务端,使用默认的数据服务端134,以便不长期占用其他代理连接使用的默认的数据服务端。If in the distributed application deployment scenario, the proxy client communication module 1322 periodically detects whether the default data server 134 is restored to normal. If the connection is normal, the data server is disconnected, and the default data server 134 is used. The default data server used by other proxy connections is not used for a long time.
数据服务端134包括数据服务端通讯模块1341、数据服务和SQL转换模块1342、SQL执行模块1343、数据库连接模块1344和配置模块1345,下面对各模块进行说明:The data server 134 includes a data server communication module 1341, a data service and SQL conversion module 1342, a SQL execution module 1343, a database connection module 1344, and a configuration module 1345. The following describes each module:
数据服务端通讯模块1341:Data server communication module 1341:
数据服务端134启动时,数据服务端通讯模块1341作为socket服务端去监听端口,并初始化线程池,每次接收到数据服务请求后,从线程池获取一个线程,执行后续处理逻辑。When the data server 134 is started, the data server communication module 1341 serves as a socket server to listen to the port, and initializes the thread pool. Each time a data service request is received, a thread is obtained from the thread pool to execute subsequent processing logic.
数据服务端通讯模块1341当接收到请求报文后从请求报文中解码出数据服务ID和业务参数,交给数据服务和SQL转换模块1342处理,并把数据服务和SQL转换模块1342的返回结果编码成响应报文,发送给代理客户端132。The data server communication module 1341 decodes the data service ID and the service parameters from the request message after receiving the request message, and passes it to the data service and SQL conversion module 1342 for processing, and returns the data service and the SQL conversion module 1342. The coded message is sent to the proxy client 132.
数据服务和SQL转换模块1342:Data Service and SQL Conversion Module 1342:
根据配置模块中缓存的数据服务ID和SQL的对应关系,把数据服务请求转换成SQL,调用SQL执行模块1343执行SQL。According to the correspondence between the data service ID and the SQL cached in the configuration module, the data service request is converted into SQL, and the SQL execution module 1343 is called to execute the SQL.
SQL执行模块1343:从配置模块1345中获取数据服务ID对应的数据库信息,从数据库连接模块1344取出该数据库的连接,使用JDBC接口执行SQL并依次注入业务参数,并把执行结果返回给上层模块。The SQL execution module 1343: obtains the database information corresponding to the data service ID from the configuration module 1345, retrieves the connection of the database from the database connection module 1344, executes the SQL using the JDBC interface, sequentially injects the service parameters, and returns the execution result to the upper module.
数据库连接模块1344:数据服务端134启动时,根据配置模块1345的数据库连接信息,使用数据库连接池和JDBC驱动连接单个或多个数据库。Database connection module 1344: When the data server 134 starts, according to the database connection information of the configuration module 1345, the database connection pool and the JDBC driver are used to connect the single or multiple databases.
配置模块1345:在配置文件中配置数据服务端134的监听端口、数据服务ID、SQL、数据服务ID和SQL的对应关系、数据库连接信息、数据服务ID和数据库连接信息的对应关系、SQL执行结果和返回javabean的映射关系。数据服务端134启动时,配置模块1345读取所有配置信息并缓存。The configuration module 1345: configures the listening port, the data service ID, the SQL, the correspondence between the data service ID and the SQL, the database connection information, the correspondence between the data service ID and the database connection information, and the SQL execution result of the data server 134 in the configuration file. And return the mapping relationship of javabean. When the data server 134 is started, the configuration module 1345 reads all configuration information and caches it.
本发明实施例中涉及的是提供高可用数据服务的方法及装置。其中,数据服务分成代理客户端和数据服务端。把数据访问逻辑配置在数据服务端里并部署成集群,把代理客户端和业务应用部署在一起,代理客户端被业务应用集成并直接调用。当数据服务端出现异常,代理客户端自动切换到集群内正常运行的其他数据服务端。本发明通过配置SQL的方式封装了数据库访问逻辑,降低了开发数据访问层的工作量;对业务应用来说本地直接调用代理客户端,不涉及网络通讯、数据库连接等,开发成本低。更为优越的是提供了高可用的数据服务方案,避免了数据服务层的单点故障,同时也能在对业务应用没影响的情况下升级和维护数据服务端。The embodiments of the present invention relate to methods and apparatus for providing highly available data services. Among them, the data service is divided into a proxy client and a data server. The data access logic is configured in the data server and deployed into a cluster, and the proxy client and the business application are deployed together, and the proxy client is integrated and directly invoked by the business application. When an exception occurs on the data server, the proxy client automatically switches to another data server that is running normally in the cluster. The invention encapsulates the database access logic by configuring the SQL, and reduces the workload of developing the data access layer; for the business application, the proxy client is directly invoked locally, and does not involve network communication, database connection, etc., and the development cost is low. It is more advantageous to provide a highly available data service solution, avoiding a single point of failure at the data service layer, and also upgrading and maintaining the data server without affecting the business application.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以 下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述模块分别位于多个处理器中。It should be noted that each of the foregoing modules may be implemented by software or hardware. For the latter, The following manner is implemented, but is not limited thereto: the above modules are all located in the same processor; or, the above modules are respectively located in multiple processors.
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:Embodiments of the present invention also provide a storage medium. Optionally, in the embodiment, the foregoing storage medium may be configured to store program code for performing the following steps:
S1,代理客户端接收业务应用发送的处理请求,其中,该处理请求用于请求对数据库中的数据进行处理;S1. The proxy client receives a processing request sent by the service application, where the processing request is used to request processing of data in the database.
S2,该代理客户端确定用于执行处理请求的数据服务端,其中,该业务应用通过代理客户端和数据服务端访问数据库;S2. The proxy client determines a data server for executing a processing request, where the service application accesses the database through the proxy client and the data server;
S3,该代理客户端将处理请求发送给确定的数据服务端;S3, the proxy client sends the processing request to the determined data server;
S4,上述确定的数据服务端根据处理请求对数据库中的数据进行处理;S4. The data server determined by the foregoing processes the data in the database according to the processing request;
S5,上述确定的数据服务端将处理结果发送给代理客户端;S5. The determined data server sends the processing result to the proxy client.
S6,上述代理客户端将接收到的处理结果发送给业务应用。S6. The proxy client sends the received processing result to the service application.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in the embodiment, the foregoing storage medium may include, but is not limited to, a USB flash drive, a Read-Only Memory (ROM), and a Random Access Memory (RAM). A variety of media that can store program code, such as a hard disk, a disk, or an optical disk.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。For example, the specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the optional embodiments, and details are not described herein again.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性Industrial applicability
通过本发明实施例,实现了将数据访问逻辑封装成数据服务系统,并且,该数据服务系统中的代理客户端能够被业务应用直接调用,屏蔽了数据服务的复杂性,并且,可以由代理客户端确定执行处理请求的数据服务端,而该数据服务端的数量可以为两个以上,从而保证了当一个数据服务端异常后,可以使用其他的数据服务端执行处理请求,保证业务服务的正 常进行,降低影响,从而解决了相关技术中存在的由于数据库访问逻辑异常导致业务服务中断的问题,进而达到了保证业务服务正常进行的效果。 Through the embodiment of the present invention, the data access logic is encapsulated into a data service system, and the proxy client in the data service system can be directly invoked by the business application, shielding the complexity of the data service, and can be represented by the proxy client. The end determines the data server that executes the processing request, and the number of the data server can be more than two, thereby ensuring that when a data server is abnormal, the other data server can be used to execute the processing request to ensure the positive of the service service. Frequently, the impact is reduced, thereby solving the problem of the business service interruption caused by the database access logic abnormality in the related technology, thereby achieving the effect of ensuring the normal operation of the business service.

Claims (16)

  1. 一种数据库处理方法,包括:A database processing method, comprising:
    代理客户端接收业务应用发送的处理请求,其中,所述处理请求用于请求对所述数据库中的数据进行处理;The proxy client receives a processing request sent by the service application, where the processing request is used to request processing of data in the database;
    所述代理客户端确定用于执行所述处理请求的数据服务端,其中,所述业务应用通过所述代理客户端和所述数据服务端访问所述数据库;Determining, by the proxy client, a data server for executing the processing request, wherein the service application accesses the database through the proxy client and the data server;
    所述代理客户端将所述处理请求发送给确定的数据服务端;The proxy client sends the processing request to the determined data server;
    所述确定的数据服务端根据所述处理请求对所述数据库中的数据进行处理;The determined data server processes the data in the database according to the processing request;
    所述确定的数据服务端将所述处理结果发送给所述代理客户端;The determined data server sends the processing result to the proxy client;
    所述代理客户端将接收到的所述处理结果发送给所述业务应用。The proxy client sends the received processing result to the service application.
  2. 根据权利要求1所述的方法,其中,所述代理客户端通过以下方式至少之一确定用于执行所述处理请求的数据服务端包括:The method according to claim 1, wherein the proxy client determines, by at least one of the following methods, that the data server for executing the processing request comprises:
    所述代理客户端根据预定配置确定数据服务端;Determining, by the proxy client, a data server according to a predetermined configuration;
    所述代理客户端根据数据服务端负荷的大小确定数据服务端,其中,所述代理客户端选择负荷最小的数据服务端。The proxy client determines the data server according to the size of the data server load, wherein the proxy client selects the data server with the least load.
  3. 根据权利要求2所述的方法,其中,当所述代理客户端根据预定配置确定数据服务端后,还包括:The method of claim 2, wherein after the proxy client determines the data server according to the predetermined configuration, the method further comprises:
    当根据预定配置确定的数据服务端异常后,所述代理客户端选择其他的处于正常运行状态的数据服务端。After the data server is determined to be abnormal according to the predetermined configuration, the proxy client selects another data server in a normal running state.
  4. 根据权利要求3所述的方法,其中,所述代理客户端选择其他的处于正常运行状态的数据服务端后,还包括:The method according to claim 3, wherein after the proxy client selects another data server in a normal running state, the method further includes:
    当所述根据预定配置确定的数据服务端恢复正常后,所述代理客户端重新选择所述根据预定配置确定的数据服务端作为执行所述处理请求的数据服务端。After the data server determined according to the predetermined configuration returns to normal, the proxy client reselects the data server determined according to the predetermined configuration as a data server that executes the processing request.
  5. 根据权利要求1所述的方法,其中,所述代理客户端接收所述业务应用发送的所述处理请求包括:The method of claim 1, wherein the receiving, by the proxy client, the processing request sent by the service application comprises:
    所述代理客户端通过接口接收所述处理请求,其中,所述接口包括以下至少之一:入口参数包括服务数据的信息的接口、入口参数数据库访问请求的接口,所述服务数据的信息用于指示所述业务应用需要处理的数据。The proxy client receives the processing request through an interface, where the interface includes at least one of: an entry parameter includes an interface of information of service data, an interface of an entry parameter database access request, and information of the service data is used Indicates the data that the business application needs to process.
  6. 根据权利要求5所述的方法,其中,所述接口为本地接口。The method of claim 5 wherein the interface is a local interface.
  7. 根据权利要求1所述的方法,其中,所述代理客户端将所述处理请求发送给确定的数据服务端包括: The method of claim 1, wherein the proxy client sends the processing request to the determined data server comprises:
    所述代理客户端按照预定通讯协议将所述处理请求编码成请求报文;The proxy client encodes the processing request into a request message according to a predetermined communication protocol;
    所述代理客户端将所述请求报文发送给所述确定的数据服务端。The proxy client sends the request message to the determined data server.
  8. 根据权利要求1所述的方法,其中,所述确定的数据服务端将所述处理结果发送给所述代理客户端包括:The method of claim 1, wherein the determining, by the determined data server, the sending of the processing result to the proxy client comprises:
    所述数据服务端按照预定通讯协议将所述处理结果返回给所述代理客户端。The data server returns the processing result to the proxy client according to a predetermined communication protocol.
  9. 一种数据库处理装置,包括:A database processing device comprising:
    接收模块,所述接收模块应用于代理客户端中,设置为接收业务应用发送的处理请求,其中,所述处理请求用于请求对所述数据库中的数据进行处理;a receiving module, the receiving module is configured to be used in a proxy client, and configured to receive a processing request sent by a service application, where the processing request is used to request processing of data in the database;
    确定模块,所述确定模块应用于代理客户端中,设置为确定用于执行所述处理请求的数据服务端,其中,所述业务应用通过所述代理客户端和所述数据服务端访问所述数据库;Determining a module, the determining module being applied to the proxy client, configured to determine a data server for executing the processing request, wherein the business application accesses the proxy through the proxy client and the data server database;
    第一发送模块,所述第一发送模块应用于代理客户端中,设置为将所述处理请求发送给确定的数据服务端;a first sending module, where the first sending module is applied to the proxy client, and is configured to send the processing request to the determined data server;
    处理模块,所述处理模块应用于确定的数据服务端中,设置为根据所述处理请求对所述数据库中的数据进行处理;a processing module, the processing module being applied to the determined data server, configured to process data in the database according to the processing request;
    第二发送模块,所述第二发送模块应用于确定的数据服务端中,设置为将所述处理结果发送给所述代理客户端;a second sending module, where the second sending module is applied to the determined data server, and is configured to send the processing result to the proxy client;
    第三发送模块,所述第三发送模块应用于代理客户端中,设置为将接收到的所述处理结果发送给所述业务应用。And a third sending module, where the third sending module is applied to the proxy client, and is configured to send the received processing result to the service application.
  10. 根据权利要求9所述的装置,其中,所述确定模块包括:The apparatus of claim 9, wherein the determining module comprises:
    第一确定单元,设置为根据预定配置确定数据服务端;a first determining unit, configured to determine a data server according to a predetermined configuration;
    第二确定单元,设置为根据数据服务端负荷的大小确定数据服务端,其中,所述代理客户端选择负荷最小的数据服务端。The second determining unit is configured to determine the data server according to the size of the data server load, wherein the proxy client selects the data server with the least load.
  11. 根据权利要求10所述的装置,其中,所述确定模块还包括:The apparatus of claim 10, wherein the determining module further comprises:
    第一选择单元,设置为当根据预定配置确定的数据服务端异常后,选择其他的处于正常运行状态的数据服务端。The first selection unit is configured to select another data server in a normal running state after the data server terminal determined according to the predetermined configuration is abnormal.
  12. 根据权利要求11所述的装置,其中,所述确定模块还包括:The apparatus of claim 11, wherein the determining module further comprises:
    第二选择单元,设置为当所述根据预定配置确定的数据服务端恢复正常后,重新选择所述根据预定配置确定的数据服务端作为执行所述处理请求的数据服务端。And a second selecting unit, configured to: after the data server determined according to the predetermined configuration returns to normal, reselect the data server determined according to the predetermined configuration as a data server that executes the processing request.
  13. 根据权利要求9所述的装置,其中,所述接收模块包括: The apparatus of claim 9, wherein the receiving module comprises:
    接收单元,设置为通过接口接收所述处理请求,其中,所述接口包括以下至少之一:入口参数包括服务数据的信息的接口、入口参数数据库访问请求的接口,所述服务数据的信息用于指示所述业务应用需要处理的数据。a receiving unit, configured to receive the processing request by using an interface, where the interface includes at least one of: an interface of an entry parameter including information of service data, an interface of an entry parameter database access request, and information of the service data is used Indicates the data that the business application needs to process.
  14. 根据权利要求13所述的装置,其中,所述接口为本地接口。The apparatus of claim 13 wherein the interface is a local interface.
  15. 根据权利要求9所述的装置,其中,所述第一发送模块包括:The apparatus of claim 9, wherein the first transmitting module comprises:
    编码单元,设置为按照预定通讯协议将所述处理请求编码成请求报文;a coding unit, configured to encode the processing request into a request message according to a predetermined communication protocol;
    发送单元,设置为将所述请求报文发送给所述确定的数据服务端。And a sending unit, configured to send the request message to the determined data server.
  16. 根据权利要求9所述的装置,其中,所述第二发送模块包括:The apparatus of claim 9, wherein the second transmitting module comprises:
    返回单元,设置为按照预定通讯协议将所述处理结果返回给所述代理客户端。 And returning to the unit, configured to return the processing result to the proxy client according to a predetermined communication protocol.
PCT/CN2016/073373 2015-05-21 2016-02-03 Database processing method and apparatus WO2016184175A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510263275.9 2015-05-21
CN201510263275.9A CN106293887A (en) 2015-05-21 2015-05-21 Data base processing method and device

Publications (1)

Publication Number Publication Date
WO2016184175A1 true WO2016184175A1 (en) 2016-11-24

Family

ID=57319328

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/073373 WO2016184175A1 (en) 2015-05-21 2016-02-03 Database processing method and apparatus

Country Status (2)

Country Link
CN (1) CN106293887A (en)
WO (1) WO2016184175A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112364087A (en) * 2020-11-26 2021-02-12 亚信科技(中国)有限公司 Method and system for accessing database by C/C + + application program of ARM platform
CN112905640A (en) * 2021-01-25 2021-06-04 武汉武钢绿色城市技术发展有限公司 Netty-based distributed database data access control method
CN113051276A (en) * 2021-04-21 2021-06-29 平安普惠企业管理有限公司 Method, device, computer equipment and storage medium for configuring business service

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108512743A (en) * 2018-03-06 2018-09-07 北京奇艺世纪科技有限公司 LAN instant messaging method of servicing, device and electronic equipment
CN110287165A (en) * 2019-05-09 2019-09-27 北京极数云舟科技有限公司 Data library device, database intermediate layer device and the method for running the database
CN112449697A (en) * 2019-06-28 2021-03-05 华为技术有限公司 Database access method and apparatus, computing device and computer program product
CN110297862B (en) * 2019-07-04 2022-10-14 中国联合网络通信集团有限公司 Database access method and database access middleware
CN112688976A (en) * 2019-10-17 2021-04-20 广州迈安信息科技有限公司 Data processing transmission service system adopting JDBC/HTTP standard
CN110764742B (en) * 2019-10-18 2023-05-23 成都信息工程大学 High-speed calculation method and system for linear correlation degree of climate observation data
CN111431894B (en) * 2020-03-20 2022-05-10 中国电力科学研究院有限公司 Method for implementing general service protocol in transparent access frame
CN111538605B (en) * 2020-04-24 2023-04-11 北京思特奇信息技术股份有限公司 Distributed data access layer middleware and command execution method and device
CN116389490A (en) * 2020-06-03 2023-07-04 支付宝(杭州)信息技术有限公司 Receiving device and task execution method
CN113836175A (en) * 2020-06-24 2021-12-24 浙江宇视科技有限公司 Data access method, device, equipment and storage medium
CN113761037A (en) * 2020-09-28 2021-12-07 西安京迅递供应链科技有限公司 Import and export method, device, server, medium and service system
CN112350856B (en) * 2020-10-27 2023-04-07 中国联合网络通信集团有限公司 Distributed service sign-off method and equipment
CN113268507B (en) * 2021-05-26 2023-03-14 大箴(杭州)科技有限公司 Database data reading system, method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6009422A (en) * 1997-11-26 1999-12-28 International Business Machines Corporation System and method for query translation/semantic translation using generalized query language
CN101163265A (en) * 2007-11-20 2008-04-16 中兴通讯股份有限公司 Distributed database based on multimedia message log inquiring method and system
CN101742702A (en) * 2009-12-31 2010-06-16 中兴通讯股份有限公司 Mobile internet service sharing system and method
CN101930472A (en) * 2010-09-09 2010-12-29 南京中兴特种软件有限责任公司 Parallel query method for distributed database
CN102201010A (en) * 2011-06-23 2011-09-28 清华大学 Distributed database system without sharing structure and realizing method thereof

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070280230A1 (en) * 2006-05-31 2007-12-06 Motorola, Inc Method and system for service discovery across a wide area network
CN101539911B (en) * 2008-03-18 2013-05-29 盛大计算机(上海)有限公司 Device and method for accelerating display of web page of browser
CN101848245B (en) * 2010-02-05 2012-12-19 德讯科技股份有限公司 SSL/XML-based database access proxy method and system
EP2721900B1 (en) * 2011-06-14 2015-04-08 Interdigital Patent Holdings, Inc. Efficiently maintaining communications connectivity for a plurality of applications

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6009422A (en) * 1997-11-26 1999-12-28 International Business Machines Corporation System and method for query translation/semantic translation using generalized query language
CN101163265A (en) * 2007-11-20 2008-04-16 中兴通讯股份有限公司 Distributed database based on multimedia message log inquiring method and system
CN101742702A (en) * 2009-12-31 2010-06-16 中兴通讯股份有限公司 Mobile internet service sharing system and method
CN101930472A (en) * 2010-09-09 2010-12-29 南京中兴特种软件有限责任公司 Parallel query method for distributed database
CN102201010A (en) * 2011-06-23 2011-09-28 清华大学 Distributed database system without sharing structure and realizing method thereof

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112364087A (en) * 2020-11-26 2021-02-12 亚信科技(中国)有限公司 Method and system for accessing database by C/C + + application program of ARM platform
CN112905640A (en) * 2021-01-25 2021-06-04 武汉武钢绿色城市技术发展有限公司 Netty-based distributed database data access control method
CN113051276A (en) * 2021-04-21 2021-06-29 平安普惠企业管理有限公司 Method, device, computer equipment and storage medium for configuring business service
CN113051276B (en) * 2021-04-21 2022-08-19 平安普惠企业管理有限公司 Method, device, computer equipment and storage medium for configuring business service

Also Published As

Publication number Publication date
CN106293887A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
WO2016184175A1 (en) Database processing method and apparatus
US10802906B2 (en) Monitoring method and apparatus of server, and storage medium
US7676516B2 (en) System and method for the optimization of database access in data base networks
US7225356B2 (en) System for managing operational failure occurrences in processing devices
US20170163479A1 (en) Method, Device and System of Renewing Terminal Configuration In a Memcached System
US10798218B2 (en) Environment isolation method and device
CN112286503A (en) Multi-registration center micro-service unified management method, device, equipment and medium
US20170163478A1 (en) Method,electronic device and system for updating client configuration in key-value pair database
CN110554927A (en) Micro-service calling method based on block chain
CN111984561B (en) IPMI command processing method, system, device and medium for BMC
US8326913B2 (en) Method and system for service contract discovery
CN111258627A (en) Interface document generation method and device
AU2015369925A1 (en) Computer readable storage media for dynamic service deployment and methods and systems for utilizing same
CN111064626B (en) Configuration updating method, device, server and readable storage medium
CN112804289A (en) Resource synchronization method, device, equipment and storage medium
US10721335B2 (en) Remote procedure call using quorum state store
CN108111630B (en) Zookeeper cluster system and connection method and system thereof
CN116800825A (en) Calling method, device, equipment and medium based on micro-service splitting
US11409511B2 (en) Method and system for downloading information
CN112711466B (en) Hanging affair inspection method and device, electronic equipment and storage medium
CN105827567B (en) Service management and control method and capability opening platform
CN115918116A (en) Information processing method, device and storage medium
CN112165529A (en) Method, device, equipment and medium for low-cost cross-network data exchange
CN110740151A (en) micro-service adjusting method, device, server and computer storage medium
CN112565340B (en) Service scheduling method, device, computer system and medium for distributed application

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: 16795662

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: 16795662

Country of ref document: EP

Kind code of ref document: A1