CN109376183B - A kind of information processing method, apparatus and system - Google Patents
A kind of information processing method, apparatus and system Download PDFInfo
- Publication number
- CN109376183B CN109376183B CN201811196333.0A CN201811196333A CN109376183B CN 109376183 B CN109376183 B CN 109376183B CN 201811196333 A CN201811196333 A CN 201811196333A CN 109376183 B CN109376183 B CN 109376183B
- Authority
- CN
- China
- Prior art keywords
- data
- information
- request
- data result
- state
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention provides a kind of information processing methods, apparatus and system, middleware forwards the request in multiple and different database instances after receiving the request that client is sent in the information processing method, as long as determining the data result for receiving and returning after request described in a database example response, the data result received is then sent to client, and data result is just sent to client after not needing the data result for waiting the database instance for all receiving request to send, required data result can be got in time.
Description
Technical field
The invention belongs to database application technical field more particularly to a kind of information processing methods, apparatus and system.
Background technique
In the case where single database (MySQL) example, database easily reaches bottleneck, and MySQL is in single library millions
Not Ji Lu in the case where, performance is mutually on duty.In order to solve the problems, such as database performance bottleneck, point library point is carried out using to database
Table, to carry out horizontal extension to database.
Point library divides the mode of table to include that client point library divides table and a proxy layers of point library to divide table, since table is divided in client point library
It is related to programming language, it is therefore desirable to independently to realize that table is divided in client point library for different programming languages, lead to client point
Library divides the development cost of table high.Based on this, generallys use a proxy layers of point library and divide table.The completely compatible MySQL agreement of proxy, to industry
Being engaged in, layer is transparent, and operation layer is without changing code, moving costs very little.
But the middleware that proxy layers point of library in the prior art divides table to use, such as Cobar, Cobar middleware are got
After the data result that multiple and different database instances are sent, data result is sent to the mode of client are as follows: each rear end point
The data result that the database instance of connection is sent Jie Shou not be communicated, whole rear ends of middleware is waited all to receive data
After the data result that library example is sent, total data result is committed to the front end of middleware, finally by front end by data knot
Fruit is sent to client.
Since the mode that existing middleware obtains the data result that multiple and different database instances are sent is block type
(BIO), it is just sent to client after needing that whole rear ends is waited to receive data result, causes user that cannot get in time
Required data.
Summary of the invention
In view of this, the purpose of the present invention is to provide a kind of information processing method, apparatus and system, to solve existing adopt
The mode for obtaining data result from multiple and different database instances with block type causes user that cannot get required number in time
According to the problem of.
Technical solution is as follows:
The present invention provides a kind of information processing method, divides on table middleware applied to a point library, comprising:
Receive the request that client is sent;
According to configuration information, forward the request at least one database instance;
Determine whether to receive the data result returned after the database instance respond request;
If it is determined that receiving the data result returned after at least one described database instance respond request, then by the number
Client is sent to according to result.
Preferably, described if it is determined that receiving the data knot returned after at least one described database instance respond request
Fruit, then the data result is sent to client includes:
Whether the state for determining the data result is an information state;It wherein, only include that head is believed in the data result
The state that the data result is determined when breath is head information state;
The state for determining the data result is head information state, then judges whether in the received excessively described data result
Head information;
If judgement did not receive the head information in the data result, the head information is sent to client;
Whether the state for determining the data result is data information state;It wherein, include data in the data result
The state that the data result is determined when information is data information state;
The state for determining the data result is data information state, then sends the data information in the data result
To client.
Preferably, the data information by the data result is sent to after client, further includes:
Judge whether to receive the full stop sent after each database instance returned data information;Wherein, described
Database instance is the database instance for receiving the request;
If judgement receives the full stop sent after each database instance returned data information, to the client
End, which is sent, terminates mark, completes the response to the request.
Preferably, described according to configuration information, after forwarding the request at least one database instance, also wrap
It includes:
Judge whether to receive error identification;If judgement receives error identification, stop responding the request.
Preferably, described according to configuration information, it forwards the request at least one database instance and includes:
According to configuration information, database instance corresponding with the request is determined;
Convert the request into request of data corresponding with each database instance respectively;
The request of data is sent in corresponding database instance respectively.
The present invention also provides a kind of information processing units, comprising:
Receiving unit, for receiving the request of client transmission;
Retransmission unit, for forwarding the request at least one database instance according to configuration information;
Determination unit is used to determine whether to receive the data result returned after the database instance respond request;
Transmission unit, for after the determination unit determines and receives at least one described database instance respond request
After the data result of return, then the data result is sent to client.
Preferably, the transmission unit includes:
Subelement is determined, for determining whether the state of the data result is an information state;Wherein, the data knot
The state that the data result is determined when only including head information in fruit is head information state;
Judgment sub-unit determines that the state of the data result is head information state for the determining subelement, then sentences
It is disconnected whether the head information in the received excessively described data result;
Transmission sub-unit did not receive the head information in the data result for judgment sub-unit judgement, then
The head information is sent to client;
The determining subelement is also used to determine whether the state of the data result is data information state;Wherein, institute
The state stated in data result including determining the data result when data information is data information state;
The transmission sub-unit is also used to determine that the state of the data result is data information in the determining subelement
Data information in the data result is then sent to client by state.
Preferably, the judgment sub-unit is also used to judge whether to receive each database instance returned data
The full stop sent after information;Wherein, the database instance is the database instance for receiving the request;
The transmission sub-unit is also used to judge that receiving each database instance returns in the judgment sub-unit
The full stop sent after data information then sends to the client and terminates mark, completes the response to the request.
Preferably, the judgment sub-unit is also used to judge whether to receive error identification;
Wherein, described device further includes terminating subelement, the end subelement, for judging in the judgment sub-unit
Error identification is received, then stops responding the request.
The present invention also provides a kind of information processing systems, comprising:
Middleware, the client being connect respectively with the middleware communication and database instance;
The above-mentioned information processing method of the middleware application.Compared with prior art, above-mentioned technology provided by the invention
Scheme has the advantages that
From above-mentioned technical proposal it is found that middleware forwards the request to after receiving the request that client is sent in the application
In multiple and different database instances, as long as determining the data knot for receiving and returning after request described in a database example response
The data result received is then sent to client by fruit, and does not need to wait the database instance for all receiving request
Data result is just sent to client after the data result of transmission, required data result can be got in time.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the present invention
Some embodiments for those of ordinary skill in the art without creative efforts, can also basis
These attached drawings obtain other attached drawings.
Fig. 1 is the schematic diagram that client of the embodiment of the present invention sends request by middleware to database instance;
Fig. 2 is to be sent to client after middleware of the embodiment of the present invention receives the data result that database instance returns
Schematic diagram;
Fig. 3 is a kind of flow chart of information processing method provided in an embodiment of the present invention;
Fig. 4 is the flow chart of another information processing method provided in an embodiment of the present invention;
Fig. 5 is MySQL protocol format schematic diagram provided in an embodiment of the present invention;
Fig. 6 be data result in the embodiment of the present invention state be head information state when middleware and client between carry out
Interactive schematic diagram;
Fig. 7 be data result in the embodiment of the present invention state be data information state when middleware and client between into
The schematic diagram of row interaction;
Fig. 8 is middleware when receiving the full stop sent after database instance returned data information in the embodiment of the present invention
The schematic diagram interacted with client;
Fig. 9 is a kind of structural schematic diagram of information processing unit provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Present embodiment discloses a kind of information processing methods, divide on table middleware applied to a point library, on Cobar, divide library
Dividing table middleware includes front end and rear end, and a front end can correspond to multiple rear ends, and front end is connect with client communication, rear end
It is communicated to connect with database instance, after the request that front end receiver to client is sent, request is parsed and is converted to multiple
Multiple requests after conversion, are forwarded in different database instances, for example, being converted to 4 by request respectively by multiple rear ends
4 requests are then forwarded in corresponding 4 database instances by 4 rear ends by a request respectively respectively.It each forwarded and ask
The rear end asked also receives the data result returned after the request that database instance response receives, and score library is made to divide table middleware can
To receive the data result returned after multiple and different database instance respond requests.Point library divide table middleware to from it is multiple not
With database instance data result merge after, client is sent to, so that client receives the response knot to request
Fruit.Although the response results to request be from multiple and different database instances, for client, receive
The response results arrived are one after the data result merging to multiple and different database instance returns as a result, this and client
It sends the request to a database instance and receives the content and indifference of a response results of this database instance return,
So that client is as one database instance of inquiry.
As shown in Figure 1, the database instance transmission after dividing table to point library by middleware for client in the present embodiment is asked
The schematic diagram asked.Including client 1, middleware 2 and database 3;Client is client 1, and the request of transmission is SQL statement
The request of form, e.g., select*from test, expression obtain content from test database, and Lancelot is that table is divided in a point library
Middleware 2, middleware 2 includes front end (FrontEnd) and rear end (Backend), in front end receiver to select*from test
After request, multiple requests are parsed and are converted to, such as select*from schema1.test, select*from
Schema2.test ..., select*from schemaN.test, by multiple rear ends respectively by select*from
Schema1.test, select*from schema2.test ..., this is multiple and different by select*from schemaN.test
Request be sent in multiple and different database instances, DB1, DB2 ... DBN be test database point library/divide table, DB1
Corresponding is schema1.test, and DB2 corresponding is schema2.test, and DBN corresponding is schemaN, therefore by select*
From schema1.test is sent to DB1, select*from schema2.test is sent to DB2, by select*from
SchemaN.test is sent to DBN.
As shown in Fig. 2, after the data result for dividing table middleware to receive database instance return for point library in the present embodiment
It is sent to the schematic diagram of client.The rear end (Backend) that point library divides each of table middleware 2 to forwarded request receives number respectively
According to the data result (ResultSet) that library example returns, after front end merges the data result that multiple rear ends receive, hair
It send to client 1, completes the response to request.
Referring to Fig. 3, the embodiment the following steps are included:
S101, the request that client is sent is received;
It when there is the request for obtaining data, being sent and being requested by client, wherein include the number for needing to obtain in request
It include course identification in request when needing to obtain course content e.g. according to mark;In addition, can also include database mark in request
Know, Database Identification obtains data from which database for determination.The form requested in the present embodiment is SQL statement, e.g.,
The request for receiving client transmission is select course from test, then it represents that is obtained and course phase from test database
The data of pass.
Certainly, the request that client is sent in other embodiments can also be the content of other forms.
S102, according to configuration information, forward the request at least one database instance;
After middleware receives the request of client transmission, the request received is forwarded to by database according to configuration information
In example.Wherein, database instance is to execute point library to database to divide point library obtained after table.It include storage in configuration information
Corresponding relationship, database between data content and database and divide the corresponding relationship between library.As deposited in test database
Contain curriculum information, and, test database horizontal extension be 3 points of libraries, be respectively schema1.test, schema2.test,
schemaN.test。
Receive client transmission " select course from test " request after, according to configuration information can determine with
Requesting corresponding database instance is schema1.test, schema2.test, schemaN.test.By " select course
From test " request is converted to " select course from corresponding with schema1.test database instance
Schema1.test ", " select course from schema2.test " corresponding with schema2.test database instance, with
SchemaN.test database instance corresponding " select course from schemaN.test " three request of data;And pass through 3
" select course from schema1.test " is forwarded to schema1.test respectively by a rear end communicated with database instance
" select course from schema2.test " is forwarded to schema2.test database instance by database instance, will
" select course from schemaN.test " is forwarded to schemaN.test database instance.
It should be noted that can request in the request received with specified database point library, e.g. as " select course
" select course from schema2.test " is then only forwarded to by a rear end by from schema2.test "
Schema2.test database instance, without will request in being forwarded to the database point library that other are stored with course.
S103, determine whether to receive the data result returned after the database instance respond request;
If it is determined that receiving the data result returned after at least one described database instance respond request, then follow the steps
S104;
Otherwise, the database instance to be received is waited to respond the data result returned after the request;
In the case where forwarding the request to multiple and different database instances respectively by multiple rear ends, each database
Example can respond this request after receiving request, execute the operation of searching request data, and return to after searching data
Between part.The rear end that database instance is each forwarded the request in middleware receives data result.Wherein, database instance connects
The request that the request received is sent with the client that middleware receives can be different, and be also possible to identical.
Due to multiple database instance respond requests and the speed that searches request data is different, and disparate databases are real
Example was also different to the time of middleware returned data result, and each rear end receives in middleware and the back end communications connect
The time for the data result that the database instance connect returns also is different.
In the present embodiment, as long as determination presence receives database instance and responds the data result returned after the request
Rear end, then the data result received is just sent to client, and do not need wait middleware whole rear ends connect
Data result could be sent to client after receiving the data result of database instance return.
It is understood that then being received in the case where sending the request to a database instance by a rear end
After the data result returned after to this database instance respond request, step S104 is executed;
S104, the data result is sent to client.
As long as there is the rear end for receiving data result in middleware, then the data result received is submitted to by rear end
Front end, and client is sent to by front end.
From above-mentioned technical proposal it is found that the middleware of the present embodiment forwards request after receiving the request that client is sent
Extremely in multiple and different database instances, as long as determining the data for receiving and returning after request described in a database example response
As a result, the data result received is then sent to client, and do not need to wait the database for all receiving request real
Data result is just sent to client after the data result that example is sent, required data result can be got in time.
Another information processing method is provided in the present embodiment, it is shown in Figure 4, the embodiment the following steps are included:
S201, the request that client is sent is received;
S202, according to configuration information, forward the request at least one database instance;
S203, determine whether to receive the data result returned after the database instance respond request;
If it is determined that receiving the data result returned after at least one described database instance respond request, then follow the steps
S204;
By taking Cobar middleware as an example, in the prior art using between Reactor model foundation client and middleware front end
Connection, realize the interaction between Cobar middleware rear end and database instance using jdbc, and jdbc is the mode of BIO.It leads
After causing a rear end of Cobar middleware to receive the data result of database instance return, data result can not be sent
To client, and after the data result for needing that whole rear ends is waited all to receive database instance return, will could disposably count
It is sent to client according to result, leads to that required data result cannot be got in time.Event trigger model is based in the present embodiment,
After receiving the data result returned after database instance respond request, data result is parsed based on MySQL agreement, is led to
The mode for crossing NIO is communicated with database instance, instead of in the prior art by way of BIO with database instance carry out
Communication.
MySQL protocol format is as shown in figure 5, include Field_Count (fixed int) field, Fields field, EOF
Field, Row field, EOF field, wherein Field count is used to indicate the Field Count in the data result of return;fileds
It is used to indicate specific field information, such as title, type;After Fields field, the eof before Row field indicates separator;Row
The data of database instance return are used to indicate, the EOF after Row field indicates full stop.Wherein, database instance will search
Data result (ResultSet) when being transmitted to middleware, Field_Count (fixed int) word is successively transmitted according to timing
Section, Fields field, EOF field, Row field, EOF field.
Due to Field_Count (fixed int) field, Fields field, EOF field these three fields be it is continuous,
And what these three fields indicated is all metadata information in data result, such as Field Count, type, does not include really number
According to, therefore the state of these three fields will be transmitted as first transmission stage, referred to as fieldList stage;Row word will be transmitted
The state of section is as second transmission stage, referred to as Row stage, this Row stage corresponding data information state;It will finally transmit
The state of EOF field transmits stage, referred to as LastEof stage as third.By parsing data result, data knot can be determined
The content for including in fruit.
Whether S204, the state for determining the data result are an information state;Wherein, only include in the data result
The state that the data result is determined when head information is head information state;
The state for determining the data result is head information state, thens follow the steps S205;
In the present embodiment, head information include the content of Field_Count (fixed int) field, Fields field it is interior
Hold and the content of EOF field, fieldList stage correspond to head information state, i.e., only includes Field_Count in data result
When the content of the content of (fixed int) field, the content of Fields field and EOF field, the data result is determined
State is head information state.It is shown in Figure 6, when the state for being data result in the present embodiment is information state middleware with
The schematic diagram interacted between client.Rear end 1 (Backend1) forward end (Frontend) delivery header information, and before passing through
Head information is sent to client by end;After at rear end 1 (Backend1), forward end (Frontend) sends excessive information, after
Hold 2 (Backend2) again forward end (Frontend) delivery header information when, front end determines what received mistake was sent with rear end 2
The identical head information of head information, then abandon the head information of the transmission of rear end 2.
S205, judge whether head information in the received excessively described data result;
If judgement did not receive the head information in the data result, S206 is thened follow the steps;
If judging the head information in the received excessively described data result, the head information received is abandoned, then
Execute step S207;
Any one database instance sends data result to the rear end of middleware, is all based on and successively sends Field_
Count (fixed int) field, Fields field, EOF field, Row field, the agreement of EOF field are completed.Due to
Field_count field, fields field, eof field are only to carry the information of data format, one sent for client
A request, after forwarding the request to multiple database instances, each database instance responds the field_ returned after the request
The content of count field, the content of fields field, the content of eof field are identical, thus, it is only required to be sent to client
The content of the content of a field_count field, the content of fields field, eof field is held, will be come from realizing
The data result of multiple database instances merges into a data result.
In practical application, any one rear end of middleware is after the data result for receiving database instance transmission, really
Surely it is in head information state, then illustrates that rear end received is the head information in data result, it is multiple for a request
Head information is identical in the data result from the transmission of disparate databases example that rear end receives, and therefore, rear end is receiving
After head information into data result, the received excessively described head information is first determined whether.If it is determined that not receiving the head
Information illustrates that before this database instance returned data result, there is no database instance returned datas for this request
As a result, head information is then sent to client;If it is determined that the received excessively described head information, illustrates for this request, herein
Before database instance returned data result, there are other database instances to return data result, then can directly abandon
The head information received.
S206, the head information is sent to client;
Whether S207, the state for determining the data result are data information state;Wherein, include in the data result
The state that the data result is determined when data information is data information state;
The state for determining the data result is data information state, thens follow the steps S208;
If receiving the content of the Row field of database instance transmission, it is determined that receive the state of the data result
For data information state;Wherein, based on MySQL agreement it is found that having been received that this before the content for receiving Row field
The content of Field_Count (fixed int) field before the Row field in data result, the content of Fields field,
The content of EOF field;It is shown in Figure 7, when the state for being data result in the present embodiment is data information state middleware with
The schematic diagram interacted between client.When the rear end forward end of middleware sends data information, front end directly receives rear end
The data information of transmission, and it is sent to client, the head that the front end receiver of middleware is sent to other rear ends in this case
Information abandons other rear ends and sends again then since forward end sends excessive information for the rear end of transmission data information
Head information.
S208, the data information in the data result is sent to client;
The content for the Row field that each database instance received is sent is sent to client in a manner of transmitting as a stream
End.
S209, judge whether to receive the full stop sent after each database instance returned data information;Wherein,
The database instance is the database instance for receiving the request;
If judgement receives the full stop sent after each database instance returned data information, then follow the steps
S210;
If judgement is not received by the full stop sent after any one of database instance returned data information, do not have
There is the response completed to request;
Full stop is the full stop in the EOF field after being located at Row field in MySQL agreement in the present embodiment, is received
Full stop in the EOF field after Row field, it is determined that be in termination phase, illustrate that the rear end of middleware is properly received
To database instance send data information and complete this database instance transmission data result transmission.
For a request, if this each rear end of request into database instance is forwarded to have sent termination respectively
Symbol, then it represents that each database instance has all correctly responded request, sends to client and terminates mark, to indicate to complete this
The data of request are all sent to client.It is shown in Figure 8, to receive database instance returned data letter in the present embodiment
The schematic diagram that middleware and client interact when the full stop sent after breath.Transmission data knot in need is stored in advance in front end
The rear end number of fruit, wherein rear end number is the rear end sum for receiving request, such as rear end number is 3, and front end often receives
The full stop (last_eof) that one rear end is sent, then front end count results subtract one, until rear end number is kept to 0, indicate front end
The full stop that each rear end is sent is had received, and is sent to client and terminates mark.
S210, Xiang Suoshu client, which are sent, terminates mark, completes the response to the request.
It is understood that can exist correctly to respond in database instance in the request response process received
The case where request, occurs, and in such cases, database instance can send error identification.Therefore, if receiving any one data
The error identification that library example is sent, it is determined that without correct respond request, and stop respond request, client cannot get number
According to result.
From above-mentioned technical proposal it is found that the middleware in the present embodiment turns request after receiving the request that client is sent
It is sent in multiple and different database instances, as long as determining the number for receiving and returning after request described in a database example response
According to as a result, the data result received is then sent to client, and do not need to wait the databases for all receiving request
Data result is just sent to client after the data result that example is sent, required data result can be got in time.
Information processing method disclosed in corresponding above-described embodiment, present embodiment discloses a kind of information processing unit, the letters
Breath processing unit is applied to a point library and divides on table middleware, which please refers to this implementation shown in Fig. 9
Information processing unit includes: in example
Receiving unit 301, retransmission unit 302, determination unit 303 and transmission unit 304;
Receiving unit 301, for receiving the request of client transmission;
Retransmission unit 302, for forwarding the request at least one database instance according to configuration information;
Determination unit 303 is used to determine whether to receive the data result returned after the database instance respond request;
Transmission unit 304, for determining that receiving at least one described database instance response asks in the determination unit
After the data result returned after asking, then the data result is sent to client.
Optionally, transmission unit 304 includes:
Determine subelement, judgment sub-unit and transmission sub-unit;
The determining subelement, for determining whether the state of the data result is an information state;Wherein, the number
It is head information state according to the state for determining the data result when only including head information in result;
The judgment sub-unit determines that the state of the data result is head information state for the determining subelement,
Then judge whether the head information in the received excessively described data result;
The transmission sub-unit did not receive the letter of the head in the data result for judgment sub-unit judgement
Breath, then be sent to client for the head information;
The determining subelement is also used to determine whether the state of the data result is data information state;Wherein, institute
The state stated in data result including determining the data result when data information is data information state;
The transmission sub-unit is also used to determine that the state of the data result is data information in the determining subelement
Data information in the data result is then sent to client by state.
The judgment sub-unit is sent out after being also used to judge whether to receive each database instance returned data information
The full stop sent;Wherein, the database instance is the database instance for receiving the request;
The transmission sub-unit is also used to judge that receiving each database instance returns in the judgment sub-unit
The full stop sent after data information then sends to the client and terminates mark, completes the response to the request.
The judgment sub-unit is also used to judge whether to receive error identification;
Wherein, described device further includes terminating subelement, the end subelement, for judging in the judgment sub-unit
Error identification is received, then stops responding the request.
From above-mentioned technical proposal it is found that the middleware in the present embodiment turns request after receiving the request that client is sent
It is sent in multiple and different database instances, as long as determining the number for receiving and returning after request described in a database example response
According to as a result, the data result received is then sent to client, and do not need to wait the databases for all receiving request
Data result is just sent to client after the data result that example is sent, required data result can be got in time.
Corresponding, the present embodiment also discloses a kind of information processing system, including middleware, logical with the middleware respectively
Believe the client and database instance of connection;
Information processing method disclosed in described middleware application above-described embodiment.Middleware in the present embodiment receives visitor
It is forwarded the request in multiple and different database instances after the request that family end is sent, as long as determination receives a database reality
Example responds the data result returned after the request, then the data result received is sent to client, and does not need
Data result is just sent to client after the data result that database instance after all receive request is sent, it can be timely
Get required data result.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other
The difference of embodiment, the same or similar parts in each embodiment may refer to each other.The device provided for embodiment
For, since it is corresponding with the method that embodiment provides, so being described relatively simple, related place is said referring to method part
It is bright.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or equipment for including a series of elements not only includes those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or equipment institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including institute
State in the process, method, article or equipment of element that there is also other identical elements.
The foregoing description of the disclosed embodiments can be realized those skilled in the art or using the present invention.To this
A variety of modifications of a little embodiments will be apparent for a person skilled in the art, and the general principles defined herein can
Without departing from the spirit or scope of the present invention, to realize in other embodiments.Therefore, the present invention will not be limited
It is formed on the embodiments shown herein, and is to fit to consistent with the principles and novel features disclosed in this article widest
Range.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (8)
1. a kind of information processing method, which is characterized in that divide on table middleware applied to a point library, comprising:
Receive the request that client is sent;
According to configuration information, forward the request at least one database instance;
Determine whether to receive the data result returned after the database instance respond request;
If it is determined that receiving the data result returned after at least one described database instance respond request, then by the data knot
Fruit is sent to client;
It is described if it is determined that receiving the data result returned after at least one described database instance respond request, then by the number
Being sent to client according to result includes:
Whether the state for determining the data result is an information state;Wherein, in the data result only include head information when
The state for determining the data result is head information state;
The state for determining the data result is head information state, then judges whether the head in the received excessively described data result
Information;
If judgement did not receive the head information in the data result, the head information is sent to client, and determine
Whether the state of the data result is data information state;Wherein, including determining institute when data information in the data result
The state for stating data result is data information state;
If judging the head information in the received excessively described data result, the head information received is abandoned, and determine institute
Whether the state for stating data result is data information state;
The state for determining the data result is data information state, then the data information in the data result is sent to visitor
Family end.
2. the method according to claim 1, wherein the data information by the data result is sent to
After client, further includes:
Judge whether to receive the full stop sent after each database instance returned data information;Wherein, the data
Library example is the database instance for receiving the request;
If judgement receives the full stop sent after each database instance returned data information, sent out to the client
It makes arrangements for his funeral and only identifies, complete the response to the request.
3. according to the method described in claim 2, it is characterized in that, described according to configuration information, forward the request to
After in a few database instance, further includes:
Judge whether to receive error identification;If judgement receives error identification, stop responding the request.
4. method according to claim 1 to 3, which is characterized in that it is described according to configuration information, it is asked by described in
It asks to be forwarded at least one database instance and includes:
According to configuration information, database instance corresponding with the request is determined;
Convert the request into request of data corresponding with each database instance respectively;
The request of data is sent in corresponding database instance respectively.
5. a kind of information processing unit characterized by comprising
Receiving unit, for receiving the request of client transmission;
Retransmission unit, for forwarding the request at least one database instance according to configuration information;
Determination unit is used to determine whether to receive the data result returned after the database instance respond request;
Transmission unit, for being returned after the determination unit determines and receives at least one described database instance respond request
Data result after, then the data result is sent to client;
Wherein, the transmission unit includes:
Subelement is determined, for determining whether the state of the data result is an information state;Wherein, in the data result
The state that the data result is determined when only including head information is head information state;
Judgment sub-unit determines that the state of the data result is head information state for the determining subelement, then judgement is
Head information in the no received excessively described data result;
Transmission sub-unit did not receive the head information in the data result for judgment sub-unit judgement, then by institute
State information and be sent to client, judge the head information in the received excessively described data result, then abandon receive it is described
Head information;
The determining subelement is also used to determine whether the state of the data result is data information state;Wherein, the number
It is data information state according to the state for determining the data result when including data information in result;
The transmission sub-unit is also used to determine that the state of the data result is data information shape in the determining subelement
Data information in the data result is then sent to client by state.
6. device according to claim 5, which is characterized in that the judgment sub-unit is also used to judge whether to receive
The full stop sent after each database instance returned data information;Wherein, the database instance is described to receive
The database instance of request;
The transmission sub-unit is also used to judge in the judgment sub-unit to receive each database instance returned data
The full stop sent after information then sends to the client and terminates mark, completes the response to the request.
7. device according to claim 6, which is characterized in that the judgment sub-unit is also used to judge whether to receive
Error identification;
Wherein, described device further includes terminating subelement, the end subelement, for judging to receive in the judgment sub-unit
To error identification, then stop responding the request.
8. a kind of information processing system characterized by comprising
Middleware, the client being connect respectively with the middleware communication and database instance;
Information processing method described in the middleware application claim 1-4 any one.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811196333.0A CN109376183B (en) | 2018-10-15 | 2018-10-15 | A kind of information processing method, apparatus and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811196333.0A CN109376183B (en) | 2018-10-15 | 2018-10-15 | A kind of information processing method, apparatus and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109376183A CN109376183A (en) | 2019-02-22 |
CN109376183B true CN109376183B (en) | 2019-08-06 |
Family
ID=65398446
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811196333.0A Active CN109376183B (en) | 2018-10-15 | 2018-10-15 | A kind of information processing method, apparatus and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109376183B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104573010A (en) * | 2015-01-08 | 2015-04-29 | 笨鸟软件科技(北京)有限公司 | Information processing method and system |
CN105550504A (en) * | 2015-12-09 | 2016-05-04 | 高玮 | Mobile medical information system and medical information processing method |
CN106484824A (en) * | 2016-09-28 | 2017-03-08 | 华东师范大学 | Knowledge mapping isomery storing framework middleware based on multivariate data storehouse supporting assembly |
CN107766393A (en) * | 2016-08-22 | 2018-03-06 | 中国移动通信集团内蒙古有限公司 | Information processing method, client and server based on database |
-
2018
- 2018-10-15 CN CN201811196333.0A patent/CN109376183B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104573010A (en) * | 2015-01-08 | 2015-04-29 | 笨鸟软件科技(北京)有限公司 | Information processing method and system |
CN105550504A (en) * | 2015-12-09 | 2016-05-04 | 高玮 | Mobile medical information system and medical information processing method |
CN107766393A (en) * | 2016-08-22 | 2018-03-06 | 中国移动通信集团内蒙古有限公司 | Information processing method, client and server based on database |
CN106484824A (en) * | 2016-09-28 | 2017-03-08 | 华东师范大学 | Knowledge mapping isomery storing framework middleware based on multivariate data storehouse supporting assembly |
Non-Patent Citations (1)
Title |
---|
"数据库相关中间件";Youyoudb;《www.360doc.com/content/16/1104/00/35661506_603769790.shtml》;20161104;第1-6页 |
Also Published As
Publication number | Publication date |
---|---|
CN109376183A (en) | 2019-02-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2003135656A (en) | MODEL AND ARCHITECTURE OF MANAGED FILTERS OF FILE SYSTEM | |
WO2021139243A1 (en) | Data processing method, device, and apparatus employing human-computer interaction, and storage medium | |
CN101263464B (en) | Parallel processing of frame based data transfers | |
CN102546612B (en) | Remote procedure call implementation method based on remote direct memory access (RDMA) protocol in user mode | |
US20230024457A1 (en) | Data Query Method Supporting Natural Language, Open Platform, and User Terminal | |
US8281039B2 (en) | Reconfigurable multimedia collaboration system | |
US7917495B1 (en) | System and method for processing query requests in a database system | |
CN1881206A (en) | Dialog system | |
JP2011520169A (en) | Method and device for accessing a directory | |
CN106657149A (en) | Communication protocol conversion method and device | |
US11263542B2 (en) | Technologies for auto discover and connect to a rest interface | |
US20100281053A1 (en) | Method, apparatus, and computer-readable medium for distributing a query | |
US20160308801A1 (en) | Email service adapter | |
CN1324844C (en) | Method for providing data to members of network synchronously by gating system | |
CN106250315A (en) | A kind of automatic imitation request-reply system and method for configurableization | |
CN110019444B (en) | Operation request processing method, device, equipment and system | |
US7797333B1 (en) | System and method for returning results of a query from one or more slave nodes to one or more master nodes of a database system | |
CN105872090B (en) | Http communication method based on extended mode code | |
CN109376183B (en) | A kind of information processing method, apparatus and system | |
CN108965359A (en) | Communication means, communication device, readable medium and electronic equipment | |
CN103248654A (en) | Negotiation method, device and system for virtual desktop service parameters | |
CN110069565B (en) | Distributed database data batch processing method and device | |
WO2021120708A1 (en) | Message processing method and device, storage medium, and electronic device | |
WO2016074572A1 (en) | Service data processing method, device and system | |
CN110069506A (en) | Maintaining method, device and the server of business datum |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |