[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN104423982A - Request processing method and device - Google Patents

Request processing method and device Download PDF

Info

Publication number
CN104423982A
CN104423982A CN201310379490.6A CN201310379490A CN104423982A CN 104423982 A CN104423982 A CN 104423982A CN 201310379490 A CN201310379490 A CN 201310379490A CN 104423982 A CN104423982 A CN 104423982A
Authority
CN
China
Prior art keywords
service
request
mentioned
treatment facility
called
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.)
Granted
Application number
CN201310379490.6A
Other languages
Chinese (zh)
Other versions
CN104423982B (en
Inventor
刘照星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201310379490.6A priority Critical patent/CN104423982B/en
Publication of CN104423982A publication Critical patent/CN104423982A/en
Application granted granted Critical
Publication of CN104423982B publication Critical patent/CN104423982B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a request processing method and device. The method includes the steps that the processing device receives a request to be executed, wherein the request is at least used for indicating the same service to be repeatedly called; the processing device responds to the request and judges whether the service called at present executes the reading operation or the writing operation; the processing device judges whether a return result corresponding to the service to be called at present is stored locally or not if the processing device judges that the service to be called at present executes the reading operation; the stored return result is obtained if the processing device judges that the return result is stored locally; if the processing device judges that the return result is not stored locally, the service is called to execute the reading operation, the return result is obtained, and the obtained return result is locally stored in the processing device. The request processing method and device solve the problem that in the prior art, the request processing time is long, and the technical effect of shortening the request processing time is achieved.

Description

The disposal route of request and treatment facility
Technical field
The application relates to internet arena, in particular to a kind of disposal route and treatment facility of request.
Background technology
In current field of Internet communication, the scale of system is done larger and larger usually, and level gets more and more, thus the service that the supplier of Internet service provides presents atomizing feature gradually, that is, be linked in existing system with requiring service relative decoupling zero newly developed.
But; atomizing designer trends usually can cause a comparatively complicated request to need to have been come by the combination of more atomization method; and in atomizing method, usually there is the situation of more far call; calling or the request of distributed synchronization such as database; also namely need to call multiple service a comparatively complicated request; and repeatedly read operation is performed in multiple service, cause processing time of asking greatly to extend along with its complexity and the increase of the quantity of atomization method that comprises.
The request comprising 4 atomization method FA, FB, FC and FD such as shown in Fig. 1, the service that wherein, each atomization method includes " by querying condition Query Database (Query A) ".In the prior art, for disposal route normally order execution 4 atomization methods of this request, and repeatedly perform above-mentioned inquiry service, thus cause the time overhead of repetition.
For the problems referred to above, at present solution effectively is not yet proposed.
Summary of the invention
The fundamental purpose of the application is the disposal route and the treatment facility that provide a kind of request, at least to solve processing time of asking in prior art longer problem.
According to an aspect of the application, provide a kind of disposal route of request, comprising: treatment facility receives pending request, wherein, above-mentioned request is at least used to indicate repeatedly calls same service; What above-mentioned treatment facility responded that above-mentioned request judges current above-mentioned service execution to be called is read operation or write operation; If what above-mentioned treatment facility judged above-mentioned current above-mentioned service execution to be called is above-mentioned read operation, then above-mentioned treatment facility judges local whether storing and above-mentioned current corresponding the returning results of above-mentioned service to be called; If above-mentioned treatment facility judges that this locality stores above-mentioned returning results, then obtain the above-mentioned of storage and return results; If above-mentioned treatment facility judges that this locality does not store above-mentioned returning results, then call above-mentioned service to perform above-mentioned read operation, obtain above-mentioned returning results, and above-mentioned the returning results got is stored in above-mentioned treatment facility this locality.
Alternatively, above-mentioned treatment facility respond that above-mentioned request judges above-mentioned current above-mentioned service execution to be called be read operation or write operation after, the disposal route of above-mentioned request also comprises: if what judge above-mentioned current above-mentioned service execution to be called is above-mentioned write operation, then above-mentioned treatment facility calls above-mentioned service to perform above-mentioned write operation, and in above-mentioned this emptying for the treatment of facility information corresponding with above-mentioned service.
Alternatively, above-mentioned treatment facility use grid node structural table to record above-mentioned returning results, wherein, above-mentioned grid node structural table comprise following one of at least: for call the input parameter of above-mentioned service, the call type of above-mentioned service, the descriptor of above-mentioned service, above-mentioned request mark, call the descriptor of the data that above-mentioned service affects.
Alternatively, what above-mentioned treatment facility responded that above-mentioned request judges above-mentioned current above-mentioned service execution to be called is that read operation or write operation comprise: configuration file corresponding to the described pending request of above-mentioned treatment facility inquiry is read operation or write operation with what judge above-mentioned current above-mentioned service execution to be called, wherein, what above-mentioned configuration file recorded above-mentioned service execution is read operation or write operation, above-mentioned configuration file at least comprise following one of at least: the call type of above-mentioned service, the descriptor of above-mentioned service, call the descriptor of the data that above-mentioned service affects, and be used to indicate whether obtained beyond this locality by above-mentioned treatment facility above-mentioned and return results the information be recorded to above-mentioned grid node structural table.
Alternatively, in above-mentioned treatment facility, empty the information corresponding with above-mentioned service comprise: search corresponding with the above-mentioned configuration file of above-mentioned service in grid node structural table, wherein, the descriptor in the descriptor in the grid node structural table in corresponding with the above-mentioned configuration file of above-mentioned service and the above-mentioned configuration file of above-mentioned service is identical; Delete the data in the above-mentioned grid node structural table found.
Alternatively, after above-mentioned treatment facility completes above-mentioned request process, the disposal route of above-mentioned request also comprises: deletion is stored in above-mentioned the above-mentioned for the treatment of facility this locality and returns results.
According to the another aspect of the application, provide a kind for the treatment of facility of request, comprising: receiving element, for receiving pending request, wherein, above-mentioned request is at least used to indicate repeatedly calls same service; First judging unit is read operation or write operation for what respond that above-mentioned request judges current above-mentioned service execution to be called; Second judging unit, for judge above-mentioned current above-mentioned service execution to be called at above-mentioned first judging unit be above-mentioned read operation time, judge local whether storing and above-mentioned current corresponding the returning results of above-mentioned service to be called; First performance element, for when above-mentioned second judging unit judges that this locality stores above-mentioned returning results, obtains store above-mentioned and returns results; And for when above-mentioned second judging unit judges that this locality does not store above-mentioned returning results, call above-mentioned service to perform above-mentioned read operation, obtain above-mentioned returning results, and above-mentioned the returning results got is stored in above-mentioned treatment facility this locality.
Alternatively, the treatment facility of above-mentioned request also comprises: the second performance element, for judge above-mentioned current above-mentioned service execution to be called be above-mentioned write operation time, call above-mentioned service to perform above-mentioned write operation, and in above-mentioned this emptying for the treatment of facility information corresponding with above-mentioned service.
Alternatively, above-mentioned treatment facility use grid node structural table to record above-mentioned returning results, wherein, above-mentioned grid node structural table comprise following one of at least: for call the input parameter of above-mentioned service, the call type of above-mentioned service, the descriptor of above-mentioned service, above-mentioned request mark, call the descriptor of the data that above-mentioned service affects.
Alternatively, above-mentioned first judging unit comprises: enquiry module, read operation or write operation for looking into inquiry configuration file corresponding to above-mentioned pending request with what judge above-mentioned current above-mentioned service execution to be called, wherein, what above-mentioned configuration file recorded above-mentioned service execution is read operation or write operation, above-mentioned configuration file at least comprise following one of at least: the call type of above-mentioned service, the descriptor of above-mentioned service, call the descriptor of the data that above-mentioned service affects, and be used to indicate whether obtained beyond this locality by above-mentioned treatment facility above-mentioned and return results the information be recorded to above-mentioned grid node structural table.
Alternatively, above-mentioned second performance element comprises: retrieval module, for search corresponding with the above-mentioned configuration file of above-mentioned service in grid node structural table, wherein, the descriptor in the descriptor in the grid node structural table in corresponding with the above-mentioned configuration file of above-mentioned service and the above-mentioned configuration file of above-mentioned service is identical; Removing module, for deleting the data in the above-mentioned grid node structural table that finds.
Alternatively, the treatment facility of above-mentioned request also comprises: delete cells, and after completing above-mentioned request process at above-mentioned treatment facility, deletion is stored in above-mentioned the above-mentioned for the treatment of facility this locality and returns results.
In the embodiment of the present application, replace serving corresponding returning results from the invoked of outside acquisition from returning results of this locality acquisition storage owing to adopting, thus the acquisition approach returned results significantly reduced needed for the request of response, and then reach the technique effect in the processing time of reducing request.
In addition, in the embodiment of the present application, due to in the response process of once asking, for the same or analogous service wherein needing to call, eliminate processes corresponding to these services to be in operation and to repeat read operation with from external unit, the third-party server of such as far-end carries out data call, thus also reach the technique effect reducing and be similar to the processing pressure of the network node of above-mentioned server, and then reach the technique effect improved as the treatment effeciency of the computer network of the implementation environment of technical scheme.
Certainly, the arbitrary product implementing the application might not need to reach above-described all advantages simultaneously.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide further understanding of the present application, and form a application's part, the schematic description and description of the application, for explaining the application, does not form the improper restriction to the application.In the accompanying drawings:
Fig. 1 is a kind of schematic diagram comprising the request of multiple atomization method;
Fig. 2 is the schematic diagram of the treatment facility of a kind of optional request according to the embodiment of the present application;
Fig. 3 is the schematic diagram of the treatment facility of optionally asking according to the another kind of the embodiment of the present application;
Fig. 4 is the schematic diagram of another treatment facility of optionally asking according to the embodiment of the present application;
Fig. 5 is the schematic diagram that another kind comprises the request of multiple atomization method;
Fig. 6 is the schematic diagram of another treatment facility of optionally asking according to the embodiment of the present application;
Fig. 7 is the schematic diagram of another treatment facility of optionally asking according to the embodiment of the present application;
Fig. 8 is the schematic diagram of another treatment facility of optionally asking according to the embodiment of the present application;
Fig. 9 is the schematic diagram of the disposal route of a kind of optional request according to the embodiment of the present application;
Figure 10 is the schematic diagram of the disposal route of optionally asking according to the another kind of the embodiment of the present application;
Figure 11 is the schematic diagram of another disposal route of optionally asking according to the embodiment of the present application;
Figure 12 is the schematic diagram of another disposal route of optionally asking according to the embodiment of the present application;
Figure 13 is the schematic diagram of another disposal route of optionally asking according to the embodiment of the present application.
Embodiment
Hereinafter also describe the application in detail with reference to accompanying drawing in conjunction with the embodiments.It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.
Embodiment 1
The embodiment of the present application provides a kind for the treatment of facility of optional request.As shown in Figure 2, this equipment can comprise:
1) receiving element 202, for receiving pending request, wherein, request is at least used to indicate repeatedly calls same service;
2) the first judging unit 204, what judge current service execution to be called for response request is read operation or write operation;
3) the second judging unit 206, for judge current service execution to be called at the first judging unit be read operation time, judge local whether storing and corresponding the returning results of current service to be called;
4) the first performance element 208, for judge at the second judging unit this locality store return results time, obtain store return results; And for when the second judging unit judges that this locality does not have storage to return results, the service of calling is to perform read operation, and acquisition returns results, and returning results of getting is stored in treatment facility this locality.
And then for more clearly describing technical scheme, and as a kind of optional embodiment, as shown in Figure 3, the first performance element 208 can comprise:
1) the first execution module 302, for judge at the second judging unit this locality store return results time, obtain store return results; And
2) the second execution module 304, for when the second judging unit judges that this locality does not have storage to return results, the service of calling is to perform read operation, and acquisition returns results, and returning results of getting is stored in treatment facility this locality.
According to the treatment facility of the request that the embodiment of the present application provides, pending request can be received by receiving element 202.
First will be clear that, one of technical scheme problem to be solved is to provide the request that a kind of equipment interconnection receives and responds, wherein, above-mentioned request can have the multiple concrete form of expression, request, server that the request that such as client conducts interviews to webpage, webpage are called Internet resources carry out the request etc. of read-write operation to the data in database, the application is not construed as limiting this.On the other hand, the generation of above-mentioned request also can have various ways, such as, for client, a request can be generated the identification of the click action on some page elements by system usually, but in some embodiments of the application, request also can be generated by the startup of timed task in system, in addition, the single thread of such as system finger daemon starts execution and also can be considered as a request, and the application is not construed as limiting this, certainly, for server and other equipment, request also can have multiple source, and the application does not do tired stating at this.
Further, above-mentioned request at least can be used to indicate and repeatedly call same service, such as, it as shown in Figure 1, can at least be used to indicate the same service to being present in respectively in four atomization method FA, FB, FC and FD---and " by querying condition Query Database (Query A) " repeatedly call.Certainly, be more than a kind of example, the application is not limited in any way for the concrete manifestation mode of above-mentioned service, and such as, it can also show as thread or the process of the more complicated operation of execution.
It should be noted that, in the embodiment of the present application, the above-mentioned receiving element 202 for receiving or retain pending request, both can with traditional for asking the treating apparatus responded to combine, thus form as one, also can independent of outside other devices in system, separately for performing process operation alleged in technical scheme, and have nothing to do in the execution of this operation of data call and follow-up other process operations for the data called.For the concrete manifestation form of the above-mentioned treatment facility in technical scheme and component units thereof, the application is not limited in any way.
Further, after receiving element 202 receives pending request, be different from the mode directly this request responded in prior art, according to the treatment facility that the embodiment of the present application provides, in the first judging unit 204, can in response to this request, what judge current service execution to be called is read operation or write operation, wherein, the read operation of service execution to be called can represent local and read data from outside, and the write operation of service execution to be called can represent that data are externally write out in this locality.Such as, for the request shown in Fig. 1, the operation of its service execution that will call is " by querying condition Query Database (Query A) ", thus what can judge this service execution to be called is read operation, and then can inform the second judging unit 206.
Under above-mentioned scene, also be, judge current service execution to be called be read operation time, according to the treatment facility that the embodiment of the present application provides, in the second judging unit 206, treatment facility can be further advanced by and judge local whether storing and corresponding the returning results of current service to be called.
Generally speaking, in the embodiment of the present application, in this locality for the treatment of facility, for the request needing repeatedly to call same service as shown in Figure 1, in response to this request, that carries out above-mentioned service repeatedly calls, and normally divides tandem to perform, thus the service that above-mentioned " current " is to be called, should be understood to as order perform repeatedly call in the service of arbitrarily allocating object once.
On basis described above, can judge whether this locality exists and corresponding the returning results of current service to be called by the second judging unit 206, such as, for as shown in Figure 1 in response to request invoked inquiry service of carrying out read operation, returning results of its correspondence can for a data item in tables of data A, thus, in the second judging unit 206, whether can store this data item to this locality to judge, if for there is this data item in judged result, then can inform the first execution module 302 further, if for there is not this data item in judged result, then can inform the second execution module 304 further, wherein, alternatively, this judgement can be realized the retrieval of local data by local data management.Certainly, be more than a kind of example, in some embodiments of the application, whether can also have above-mentioned returning results to this locality by other means to judge, above-mentioned returning results also can not be embodied in a data item, etc., the application is not construed as limiting this.
According to the treatment facility that the embodiment of the present application provides, if judge that this locality does not store above-mentioned returning results in the second judging unit 206, then can in the second execution module 304, the service of calling is to perform read operation, and acquisition returns results.Generally speaking, in the embodiment of the present application, the above-mentioned service of calling also obtains to perform read operation the process returned results, and usually directly can adopt any similar process feasible in prior art, to reach the object responded request that the application will reach.But on this basis, in the embodiment of the present application, further returning results of getting can also be stored in treatment facility this locality, thus be stored in returning results for the treatment of facility this locality can in follow-up operation, substitute and be stored in returning results beyond this locality, as the new acquisition approach of the same service of subsequent calls.
Such as, for as shown in Figure 1 in response to request invoked inquiry service of carrying out read operation, when it is called first, called in the atomization method FA that above-mentioned request such as shown in Fig. 1 is called, return results corresponding with this inquiry service can not be there is in this locality for the treatment of facility, such as, meet the data item A of querying condition in database, thus can judge that this locality does not store above-mentioned returning results in the second judging unit 206, and then as the response for this request, in the second execution module 304, directly can call this inquiry service and perform corresponding read operation, with from the position beyond this locality for the treatment of facility, such as be stored in the database on third-party server and obtain data item A, and the data item A of acquisition is stored in this locality for the treatment of facility.
Certainly, this is a kind of example, the application is not limited in any way this, such as, particularly, the application is not construed as limiting for the memory device returning results the correspondence in treatment facility this locality got, memory location and the data management mode that adopts, etc., such as above-mentioned returning results can be stored in local buffer memory, also can be stored in the storer of other types.
According to the treatment facility that the embodiment of the present application provides, if judge that this locality stores above-mentioned returning results in the second judging unit 206, then can in the first execution module 302, this of acquisition storage returns results.Wherein, to be different from prior art when responding request, usual sameization ground directly calls service execution read operation and obtains and returns results, in the embodiment of the present application, according to the result judging to draw in the second judging unit 206, this has been had when returning results in this locality, such as this return results obtain beyond this locality in advance and be stored in this locality, then no longer can continue to call this service execution and obtain the read operation returned results from outside, but in the first execution module 302, directly obtain this that prestore from this locality and return results.
Such as, for as shown in Figure 1 in response to request invoked inquiry service of carrying out read operation, in conjunction with above-mentioned second judging unit 206, corresponding the returning results of inquiry service is obtained beyond this locality for the treatment of facility, and this is returned results on the basis of this locality being stored to treatment facility, when same inquiry service is again called, again called in FB such as after the atomization method FA that above-mentioned request is called, because this locality has existed return results corresponding with this inquiry service, thus can judge that this locality stores above-mentioned returning results in the second judging unit 206, such as, meet the data item A of querying condition in database, thus in the first execution module 302, the data item A stored can be obtained from this locality.
As can be seen from the above description, by the treatment facility that the embodiment of the present application provides, in the first execution module 302, replace serving corresponding returning results from the invoked of outside acquisition from returning results of this locality acquisition storage owing to adopting, thus the acquisition approach returned results significantly reduced needed for the request of response, and then reach the technique effect in the processing time of reducing request, and due to in the response process of once asking, for the same or analogous service wherein needing to call, eliminate processes corresponding to these services to be in operation and to repeat read operation with from external unit, the third-party server of such as far-end carries out data call, thus also reach the technique effect reducing and be similar to the processing pressure of the network node of above-mentioned server, and then reach the technique effect improved as the treatment effeciency of the computer network of the implementation environment of technical scheme.
On the other hand, as shown in Figure 4, as the optional embodiment of one, being after read operation or write operation judge according to the first judging unit 204 to current service execution to be called, above-mentioned treatment facility can also comprise and being coupled with the first judging unit 204:
1) the second performance element 402, for judge current service execution to be called be write operation time, the service of calling to perform write operation, and this emptying for the treatment of facility with serve corresponding information.
Generally speaking, in the embodiment of the present application, the service of calling of above-mentioned treatment facility is with the process performing write operation, usually any similar process feasible in prior art can directly be adopted, to reach the object responded request that the application will reach, wherein, above-mentioned write operation can represent the operation upgraded the data of this service maybe provider of this request performed by the service of calling in request.It should be noted that in the embodiment of the present application, although the message being used to indicate the service of calling is sent by treatment facility, but, for performing the main body of write operation, can be above-mentioned treatment facility, also can be the device beyond above-mentioned treatment facility, the application be not construed as limiting this.
On basis described above, be different from prior art, according to the treatment facility that the embodiment of the present application provides, in the second performance element 402, can also further in the information that this emptying for the treatment of facility is corresponding with service.In the embodiment of the present application, aforesaid operations can be coupled with aforementioned second judging unit 206, first execution module 302 or the second execution module 304, reaches correctly to the technique effect of asking to respond.Below in conjunction with Fig. 5, its principle is set forth.
In Figure 5, a certain request can at least need to call 3 atomization method FE, FF, FG, wherein, in the forward atomization method FE called and the atomization method FG called rearward, include the thread that the service of " by querying condition Query Database (queryA) " this execution read operation is called, for ease of describing, this service is designated as first service, between FE and FG in invoked atomization method FF, comprise the thread that the service of " content (modify B) in amendment XML document " this execution write operation is called, for ease of describing, this service is designated as second service, wherein, above-mentioned database and XML document are stored in the position beyond treatment facility this locality, such as can be positioned on third-party server.
Under above-mentioned scene, according to the treatment facility that the embodiment of the present application provides, after receiving this request by receiving element 202, during by service in sequence call 3 atomization methods, first judged by the type of the first judging unit 204 to the operation performed by each service to be called respectively, such as, for atomization method FE, can be read operation what judge that first service that it calls performs, thus can by the first execution module 302 or the second execution module 304 from this locality for the treatment of facility or outsidely obtain return results corresponding with first service, such as meet the data item A of querying condition, and the data item A of acquisition is stored in treatment facility this locality, or there is data item A treatment facility this locality, and then the process of atomization method FE is finished.After this, for atomization method FF, what can judge its second service execution of calling is write operation, thus can by the second performance element 402 normal call second service to perform corresponding write operation, such as data item B can be write XML document, and in this emptying for the treatment of facility information corresponding with second service, and then the process of atomization method FF is finished.Under this scene, if first service to return results the data item A also namely read be corresponding with second service, such as, the result that the XML document that data item B writes is run on third-party server will have influence on the source data item A stored in its database, then in above-mentioned second performance element 402, the data item A that treatment facility this locality has can be emptied, and then, for the atomization method FG of subsequent calls, what can judge its first service execution of calling equally is read operation, thus in the second judging unit 206, because data item A is cleared in this locality, can judge that treatment facility this locality does not exist return results corresponding with first service to be called, and then can normally call first service by the second execution module 304 and may cause being worth the data item A changed due to the write operation of data item B when calling second service to obtain from the database on third-party server, and by obtain may be upgrade after data item A be stored in this locality for the treatment of facility.
As can be seen from the above description, if do not perform the clear operation in the second performance element 402 in above-mentioned scene, during the request that process needs then may be caused to call the difference service performing read operation and write operation, returning results of upgrading in processing procedure cannot be obtained in time, thus cause the problem that mistake responds is carried out to request.On the other hand, in the embodiment of the present application, by the introducing of the second performance element 402, solve above-mentioned technical matters, and then reach the technique effect improved asking the accuracy processed.
It should be noted that, above-described embodiment exemplarily proposes, and can't form any restriction to the application.Such as, write operation performed by above-mentioned service to be called, both can represent insertion, also can represent the write operation that deletion or replacement etc. are concrete, and the amendment object of this write operation also can be other any feasible objects beyond XML document, and the application is not construed as limiting this.
Below in conjunction with table 1 and Fig. 6 to Fig. 8, by some specific embodiments of the application, to the concrete judgement implementation of the read/write operation in above-mentioned first judging unit 204, and the relevant information returning results and serve is described in detail at the storage mode for the treatment of facility this locality.
Reference table 1, as the optional embodiment of one, in the embodiment of the present application, can use grid node structural table on a processing device to record and return results, wherein, table 1 be stored in a grid node structural table for the treatment of facility this locality for representing.
Table 1
As shown in table 1, grid node structural table can comprise following information: for the call type of the input parameter of the service of calling, service, service descriptor, return results, the descriptor of data that the mark of asking, the service of calling affect, wherein, the identification item as these information can the field name shown in table 1 the 1st arranges be formed.
Wherein, the information content of input parameter record can as shown in table 1 the 3rd row, for recording the correlated inputs parameter of the service of calling, also correlated inputs parameter when service process starts or in process is namely called, such as the request shown in Fig. 1, the service of invoked execution read operation " by querying condition Query Database (Query A) ", its correlation parameter can be querying condition " A ".
The information content of the field record of the call type of service may be used for the call type recording service, such as, by different field, it can represent that database data calls or the service of distributed synchronization interface interchange respectively, and the call type that record is corresponding with called or to be called service in grid node structural table.Generally speaking, the different network frame that this call type can contact according to the implementation environment of technical scheme is classified, but the application is not construed as limiting this.
The field of the descriptor of service may be used for recording the information relevant to service itself, such as, shown in table 1 the 3rd arranges, if database data calls, then this model object record can be that the specific address of database and table name claim, if record is the service of distributed synchronization interface interchange, what then record can be the specific address of this service, uniquely to determine this service.
The information returning results record may be used for recording that read operation obtains returns results, such as, as the data item A meeting querying condition that the response for request as shown in Figure 1 returns.Alternatively, as shown in Fig. 1 secondary series, be recorded in returning results in grid node structural table and can be embodied in the data structure mapping Map type, wherein, the data structure of this Map type can comprise the key-value pair be made up of key (Key) and corresponding value (Value) so that performed by the service of subsequent calls to this call operation returned results.
The information of the field record of the mark of request can represent unique handle indicating this request, and such as, that records in the process of this request can by the character string made a check mark.The mark of request may be used for identifying above-mentioned returning results and is returned in the processing procedure of which request, thus in the disposal route of above-mentioned request, can judge that this returns results further whether obtained by the request at current service place to be called, if, then can perform and obtain this operation returned results from this locality, if not, then current service to be called can normally be performed.
The descriptor of the data that the service of calling affects may be used for recording affected back end, and such as, it can be a tables of data for the treatment of facility this locality, etc.As shown in table 1 secondary series, the descriptor of the data that the service of calling affects can be embodied in enumeration type, the content of its record can be empty, also can be a back end, can also be multiple, such as 3 atomization method FE are called at least needing as shown in Figure 5, FF, the request of FG, after wherein needing the atomization method FF process of calling the service performing write operation to complete, all data that this write operation affects can be recorded in the descriptor of data that affects of the above-mentioned service of calling in grid node structural table, thus the clear operation that can be performed by the second performance element 402 is by these data dumps, so that for the atomization method FG process performed thereafter.
In addition, table 1 secondary series can represent the storage organization of above-mentioned multinomial information in this locality for the treatment of facility in grid node structural table.
In the embodiment of the present application, the information recorded in above-mentioned grid node structural table all may be used for identifying with the service corresponding to this grid node structural table, and may be used in above-mentioned first execution module 302 in returning results for the treatment of facility this locality execution and/or calling of relevant information.
Certainly, those skilled in the art are to be understood that, play the grid node structural table recording the effect of relevant information returning results and serve and also only can comprise partial information in above-mentioned table 1, in addition, this grid node structural table also can show as other forms, or does not occur in a tabular form.But the distortion of the above-mentioned technical scheme in the application design that the application provides, all should be considered as within the protection domain of the application.
And then as shown in Figure 6, alternatively, in the embodiment of the present application, the first judging unit 204 can comprise:
1) enquiry module 602 is read operation or write operation for inquiring about configuration file corresponding to pending request with what judge current service execution to be called.
Wherein, enquiry module 602 can be identified current service to be called by the configuration file being stored in treatment facility this locality, when the match is successful for the two, namely the relevant information of current service to be called can be reflected by configuration file, what such as configuration file can record this service execution is read operation or write operation, thus, can in enquiry module 602 by current service execution to be called is gone out to the inquiry judging of configuration file be which kind of operation.It should be noted that, in some embodiments of the application, such as, for the network environment of relative closure, above-mentioned configuration file can be static, but in other embodiments of the application, above-mentioned configuration file also can be dynamic, can adjust with the variation of the implementation environment of technical scheme.
Configuration file is outside read operation or write operation what record service execution, can also comprise following content: the descriptor of the data that the call type of service, the descriptor of service, the service of calling affect and be used to indicate whether to be obtained beyond this locality by treatment facility and return results the information be recorded to grid node structural table.Such as, in an embodiment of the application, configuration file can have following form:
(call type of service: the descriptor of service: be used to indicate whether treatment facility to be obtained beyond this locality and return results the information be recorded to grid node structural table: the descriptor of the data that the service of calling affects: the type of the operation of service execution)
Wherein, under a scene, the record of configuration file corresponding with it can be:
(dubbo:com.alifi.venuscore.service.LoanApi.getLoan:Y: request slip: read)
Under this scene, by to the inquiry of configuration file and known, the call type of service can be " dubbo " type (call type defined in a kind of existing network frame), the path of calling of the service that the descriptor of serving embodies can be " com.alifi.venuscore.service.LoanApi.getLoan ", be used to indicate and whether treatment facility obtained beyond this locality that to return results the information grid node structural table of being recorded to can be " Y ", also be "Yes", the descriptor of the data that the service of calling affects can be " request slip ", and the type of the operation of service execution can be " reading ", also i.e. read operation.
As can be seen from the above description, by the configuration to configuration file, can whether be incorporated in grid node structural table service to be called easily, or the second judging unit 206, first execution module 302 whether informed to by indication information in above-mentioned treatment facility or the second execution module 304 regulate and control.On the other hand, configuration file also may be used for the relevant information recording service with grid node structural table accordingly, thus can using grid node structural table as the data structure dynamically updated when, as the storage medium that retention cycle is relatively grown, serve the first execution module 302 from treatment facility this locality to calling of returning results.
And then as shown in Figure 7, alternatively, in the embodiment of the present application, above-mentioned second performance element 402 can comprise:
1) retrieval module 702, the grid node structural table in corresponding for the configuration file searched with serve, wherein, with service configuration file corresponding in grid node structural table in descriptor and service configuration file in descriptor identical;
2) removing module 704, for deleting the data in the grid node structural table that finds.
Wherein, retrieval module 702 and removing module 704 pass through to adopt configuration file inquire about as reference and delete the mode of the data in corresponding grid node structural table, can complete the null clear operation carried out after the service call for execution write operation described in the second performance element 402 completes easy, rapidly.Certainly, configuration file described in the application can not only for above object, generally speaking, configuration file can define needing the service safeguarded, such as, definition service is read operation or write operation, and the data etc. that read/write operation has influence on, thus can play the effect of management service description.
Alternatively, as shown in Figure 8, in the embodiment of the present application, after above-mentioned treatment facility completes above-mentioned request process, can also comprise according to the treatment facility that the embodiment of the present application provides:
1) delete cells 802, after completing request process at treatment facility, deletes and is stored in returning results for the treatment of facility this locality.
As previously mentioned, in the embodiment of the present application, can using grid node structural table as the data result dynamically updated, be stored in as in the interim storage space of its of distributing, such as, grid node structural table can be distributed in the comparatively faster local cache of data processing speed.Under above-mentioned scene, can in the processing procedure of once asking, meeting the Rule of judgment of preorder and performing when returning results the operation of this locality being stored in treatment facility in the second execution module 304, the grid node structural table of the relevant information returned results recording and serve is stored in above-mentioned local cache, and in the processing procedure of this request after call the service of same execution read operation time, in the first execution module 302, data are obtained from the grid node structural table being arranged in local cache, thus the processing speed of request can be accelerated further.
Under above-mentioned scene, on the other hand, can also after treatment facility executes above-mentioned request, in delete cells 802, deletion is returned results by what be stored in treatment facility this locality, thus can by the above-mentioned interim storage space for returning results distribution, such as, delete in above-mentioned local cache, thus the storage space of release may be used for the processing procedure of request next time, or use for other processes of system, thus when the disposal route of the request provided according to the embodiment of the present application processes a large amount of requests simultaneously, reach the technique effect of the service efficiency promoting internal memory.
Embodiment 2
Present invention also provides a kind of disposal route of request.As shown in Figure 9, the method can comprise:
S902: treatment facility receives pending request, wherein, request is at least used to indicate repeatedly calls same service;
S904: what treatment facility response request judged current service execution to be called is read operation or write operation,
If read operation, then perform step S906;
S906: treatment facility judges local whether storing and corresponding the returning results of current service to be called,
If so, then step S908 is performed,
If not, then step S910 is performed;
S908: obtain returning results of storage;
S910: the service of calling is to perform read operation, and acquisition returns results, and returning results of getting is stored in treatment facility this locality.
According to the disposal route of the request that the embodiment of the present application provides, in step S902, pending request can be received by treatment facility.
First will be clear that, one of technical scheme problem to be solved is to provide a kind of method and responds to the request received, wherein, above-mentioned request can have the multiple concrete form of expression, request, server that the request that such as client conducts interviews to webpage, webpage are called Internet resources carry out the request etc. of read-write operation to the data in database, the application is not construed as limiting this.On the other hand, the generation of above-mentioned request also can have various ways, such as, for client, a request can be generated the identification of the click action on some page elements by system usually, but in some embodiments of the application, request also can be generated by the startup of timed task in system, in addition, the single thread of such as system finger daemon starts execution and also can be considered as a request, and the application is not construed as limiting this, certainly, for server and other equipment, request also can have multiple source, and the application does not do tired stating at this.
Further, above-mentioned request at least can be used to indicate and repeatedly call same service, such as, it as shown in Figure 1, can at least be used to indicate the same service to being present in respectively in four atomization method FA, FB, FC and FD---and " by querying condition Query Database (Query A) " repeatedly call.Certainly, be more than a kind of example, the application is not limited in any way for the concrete manifestation mode of above-mentioned service, and such as, it can also show as thread or the process of the more complicated operation of execution.
It should be noted that, in the embodiment of the present application, the above-mentioned treatment facility for receiving or retain pending request, both can with traditional for asking the treating apparatus responded to combine, thus form as one, also can independent of outside other devices in system, separately for performing process operation alleged in technical scheme, and have nothing to do in the execution of this operation of data call and follow-up other process operations for the data called.For the concrete manifestation form of the treatment facility in technical scheme, the application is not limited in any way.
Further, after treatment facility receives pending request, be different from the mode directly this request responded in prior art, according to the disposal route of the request that the embodiment of the present application provides, in step S904, can in response to this request, what judge current service execution to be called is read operation or write operation, wherein, the read operation of service execution to be called can represent local and read data from outside, and the write operation of service execution to be called can represent that data are externally write out in this locality.Such as, for the request shown in Fig. 1, the operation of its service execution that will call is " by querying condition Query Database (Query A) ", thus what can judge this service execution to be called is read operation, and then can continue to perform step S906.
Under above-mentioned scene, also be, judge current service execution to be called be read operation time, according to the disposal route of the request that the embodiment of the present application provides, in step S906, treatment facility can be further advanced by and judge local whether storing and corresponding the returning results of current service to be called.
Generally speaking, in the embodiment of the present application, in this locality for the treatment of facility, for the request needing repeatedly to call same service as shown in Figure 1, in response to this request, that carries out above-mentioned service repeatedly calls, and normally divides tandem to perform, thus the service that above-mentioned " current " is to be called, should be understood to as order perform repeatedly call in the service of arbitrarily allocating object once.
On basis described above, can judge whether this locality exists and corresponding the returning results of current service to be called by treatment facility, such as, for as shown in Figure 1 in response to request invoked inquiry service of carrying out read operation, returning results of its correspondence can for a data item in tables of data A, thus, in step S906, whether can store this data item to this locality to judge, if for there is this data item in judged result, then can perform step S908 further, if for there is not this data item in judged result, then can perform step S910 further, wherein, alternatively, this judgement can be realized the retrieval of local data by local data management.Certainly, be more than a kind of example, in some embodiments of the application, whether can also have above-mentioned returning results to this locality by other means to judge, above-mentioned returning results also can not be embodied in a data item, etc., the application is not construed as limiting this.
According to the disposal route of the request that the embodiment of the present application provides, if judge in step S906, this locality does not store above-mentioned returning results, then can in step S910, and the service of calling is to perform read operation, and acquisition returns results.Generally speaking, in the embodiment of the present application, the above-mentioned service of calling also obtains to perform read operation the process returned results, and usually directly can adopt any similar process feasible in prior art, to reach the object responded request that the application will reach.But on this basis, in the embodiment of the present application, further returning results of getting can also be stored in treatment facility this locality, thus be stored in returning results for the treatment of facility this locality can in follow-up operation, substitute and be stored in returning results beyond this locality, as the new acquisition approach of the same service of subsequent calls.
Such as, for as shown in Figure 1 in response to request invoked inquiry service of carrying out read operation, when it is called first, called in the atomization method FA that above-mentioned request such as shown in Fig. 1 is called, return results corresponding with this inquiry service can not be there is in this locality for the treatment of facility, such as, meet the data item A of querying condition in database, thus can judge in step S906 that this locality does not store above-mentioned returning results, and then as the response for this request, in step S910, directly can call this inquiry service and perform corresponding read operation, with from the position beyond this locality for the treatment of facility, such as be stored in the database on third-party server and obtain data item A, and the data item A of acquisition is stored in this locality for the treatment of facility.
Certainly, this is a kind of example, the application is not limited in any way this, such as, particularly, the application is not construed as limiting for the memory device returning results the correspondence in treatment facility this locality got, memory location and the data management mode that adopts, etc., such as above-mentioned returning results can be stored in local buffer memory, also can be stored in the storer of other types.
According to the disposal route of the request that the embodiment of the present application provides, if judge in step S906, this locality stores above-mentioned returning results, then can in step S908, and this of acquisition storage returns results.Wherein, to be different from prior art when responding request, usual sameization ground directly calls service execution read operation and obtains and returns results, in the embodiment of the present application, according to the result judging to draw in step S906, this has been had when returning results in this locality, such as this return results obtain beyond this locality in advance and be stored in this locality, then no longer can continue to call this service execution and obtain the read operation returned results from outside, but in step S908, directly obtain this that prestore from this locality and return results.
Such as, for as shown in Figure 1 in response to request invoked inquiry service of carrying out read operation, in conjunction with above-mentioned steps S906, corresponding the returning results of inquiry service is obtained beyond this locality for the treatment of facility, and this is returned results on the basis of this locality being stored to treatment facility, when same inquiry service is again called, again called in FB such as after the atomization method FA that above-mentioned request is called, because this locality has existed return results corresponding with this inquiry service, thus can judge in step S906 that this locality stores above-mentioned returning results, such as, meet the data item A of querying condition in database, thus in step S908, the data item A stored can be obtained from this locality.
As can be seen from the above description, the disposal route of the request provided by the embodiment of the present application, in step S908, replace serving corresponding returning results from the invoked of outside acquisition from returning results of this locality acquisition storage owing to adopting, thus the acquisition approach returned results significantly reduced needed for the request of response, and then reach the technique effect in the processing time of reducing request, and due to in the response process of once asking, for the same or analogous service wherein needing to call, eliminate processes corresponding to these services to be in operation and to repeat read operation with from external unit, the third-party server of such as far-end carries out data call, thus also reach the technique effect reducing and be similar to the processing pressure of the network node of above-mentioned server, and then reach the technique effect improved as the treatment effeciency of the computer network of the implementation environment of technical scheme.
On the other hand, as shown in Figure 10, as the optional embodiment of one, being after read operation or write operation judge according to step S904 to current service execution to be called, what perform if judge is write operation, then the disposal route of above-mentioned request can also comprise:
S1002: the treatment facility service of calling to perform write operation, and this emptying for the treatment of facility with serve corresponding information.
Generally speaking, in the embodiment of the present application, the service of calling of above-mentioned treatment facility is with the process performing write operation, usually any similar process feasible in prior art can directly be adopted, to reach the object responded request that the application will reach, wherein, above-mentioned write operation can represent the operation upgraded the data of this service maybe provider of this request performed by the service of calling in request.It should be noted that in the embodiment of the present application, although the message being used to indicate the service of calling is sent by treatment facility, but, for performing the main body of write operation, can be above-mentioned treatment facility, also can be the device beyond above-mentioned treatment facility, the application be not construed as limiting this.
On basis described above, be different from prior art, according to the disposal route of the request that the embodiment of the present application provides, in step S1002, can also empty in processing further and serve corresponding information.In the embodiment of the present application, aforesaid operations can be coupled with abovementioned steps S906, S908 or S910, reaches correctly to the technique effect of asking to respond.Below in conjunction with Fig. 5, its principle is set forth.
In Figure 5, a certain request can at least need to call 3 atomization method FE, FF, FG, wherein, in the forward atomization method FE called and the atomization method FG called rearward, include the thread that the service of " by querying condition Query Database (queryA) " this execution read operation is called, for ease of describing, this service is designated as first service, between FE and FG in invoked atomization method FF, comprise the thread that the service of " content (modify B) in amendment XML document " this execution write operation is called, for ease of describing, this service is designated as second service, wherein, above-mentioned database and XML document are stored in the position beyond treatment facility this locality, such as can be positioned on third-party server.
Under above-mentioned scene, according to the disposal route of the request that the embodiment of the present application provides, after receiving this request by step S902, during by service in sequence call 3 atomization methods, first by step S904, the type of the operation performed by each service to be called is judged respectively, such as, for atomization method FE, can be read operation what judge that first service that it calls performs, thus can by step S908 or S910 from this locality for the treatment of facility or return results corresponding with first service of outside acquisition, such as meet the data item A of querying condition, and the data item A of acquisition is stored in treatment facility this locality, or there is data item A treatment facility this locality, and then the process of atomization method FE is finished.After this, for atomization method FF, what can judge its second service execution of calling is write operation, thus can by step S1002 normal call second service to perform corresponding write operation, such as data item B can be write XML document, and in this emptying for the treatment of facility information corresponding with second service, and then the process of atomization method FF is finished.Under this scene, if first service to return results the data item A also namely read be corresponding with second service, such as, the result that the XML document that data item B writes is run on third-party server will have influence on the source data item A stored in its database, then in above-mentioned steps S1002, the data item A that treatment facility this locality has can be emptied, and then, for the atomization method FG of subsequent calls, what can judge its first service execution of calling equally is read operation, thus in step S906, because data item A is cleared in this locality, can judge that treatment facility this locality does not exist return results corresponding with first service to be called, and then can normally call first service by step S910 and may cause being worth the data item A changed due to the write operation of data item B when calling second service to obtain from the database on third-party server, and by obtain may be upgrade after data item A be stored in this locality for the treatment of facility.
As can be seen from the above description, if do not perform the clear operation in step S1002 in above-mentioned scene, during the request that process needs then may be caused to call the difference service performing read operation and write operation, returning results of upgrading in processing procedure cannot be obtained in time, thus cause the problem that mistake responds is carried out to request.On the other hand, in the embodiment of the present application, by the introducing of step S1002, solve above-mentioned technical matters, and then reach the technique effect improved asking the accuracy processed.
It should be noted that, above-described embodiment exemplarily proposes, and can't form any restriction to the application.Such as, write operation performed by above-mentioned service to be called, both can represent insertion, also can represent the write operation that deletion or replacement etc. are concrete, and the amendment object of this write operation also can be other any feasible objects beyond XML document, and the application is not construed as limiting this.
Below in conjunction with the table 1 shown in enforcement 1 and Figure 11 to Figure 13, by some specific embodiments of the application, to the concrete judgment mode of the read/write operation in the disposal route of above-mentioned request, and the relevant information returning results and serve is described in detail at the storage mode for the treatment of facility this locality.
Table 1 shown in reference implementation 1, as the optional embodiment of one, in the embodiment of the present application, can grid node structural table be used on a processing device record and return results, wherein, table 1 is for representing the grid node structural table being stored in treatment facility this locality.
As shown in table 1, grid node structural table can comprise following information: for the call type of the input parameter of the service of calling, service, service descriptor, return results, the descriptor of data that the mark of asking, the service of calling affect, wherein, the identification item as these information can the field name shown in table 1 the 1st arranges be formed.
Wherein, the information content of input parameter record can as shown in table 1 the 3rd row, for recording the correlated inputs parameter of the service of calling, also correlated inputs parameter when service process starts or in process is namely called, such as the request shown in Fig. 1, the service of invoked execution read operation " by querying condition Query Database (Query A) ", its correlation parameter can be querying condition " A ".
The information content of the field record of the call type of service may be used for the call type recording service, such as, by different field, it can represent that database data calls or the service of distributed synchronization interface interchange respectively, and the call type that record is corresponding with called or to be called service in grid node structural table.Generally speaking, the different network frame that this call type can contact according to the implementation environment of technical scheme is classified, but the application is not construed as limiting this.
The model object of the descriptor of service may be used for recording the information relevant to service itself, such as, shown in table 1 the 3rd arranges, if database data calls, then this model object record can be that the specific address of database and table name claim, if record is the service of distributed synchronization interface interchange, what then record can be the specific address of this service, uniquely to determine this service.
The information returning results record may be used for recording that read operation obtains returns results, such as, as the data item A meeting querying condition that the response for request as shown in Figure 1 returns.Alternatively, as shown in Fig. 1 secondary series, be recorded in returning results in grid node structural table and can be embodied in the data structure mapping Map type, wherein, the data structure of this Map type can comprise the key-value pair be made up of key (Key) and corresponding value (Value) so that performed by the service of subsequent calls to this call operation returned results.
The information of the field record of the mark of request can represent unique handle indicating this request, and such as, that records in the process of this request can by the character string made a check mark.The mark of request may be used for identifying above-mentioned returning results and is returned in the processing procedure of which request, thus in the disposal route of above-mentioned request, can judge that this returns results further whether obtained by the request at current service place to be called, if, then can perform and obtain this operation returned results from this locality, if not, then current service to be called can normally be performed.
The descriptor of the data that the service of calling affects may be used for recording affected back end, and such as, it can be a tables of data for the treatment of facility this locality, etc.As shown in table 1 secondary series, the descriptor of the data that the service of calling affects can be embodied in enumeration type, the content of its record can be empty, also can be a back end, can also be multiple, such as 3 atomization method FE are called at least needing as shown in Figure 5, FF, the request of FG, after wherein needing the atomization method FF process of calling the service performing write operation to complete, all data that this write operation affects can be recorded in the descriptor of data that affects of the above-mentioned service of calling in grid node structural table, thus the clear operation that can be performed by step SX1002 is by these data dumps, so that for the atomization method FG process performed thereafter.
In addition, table 1 secondary series can represent the storage organization of above-mentioned multinomial information in this locality for the treatment of facility in grid node structural table.
In the embodiment of the present application, the information recorded in above-mentioned grid node structural table all may be used for identifying with the service corresponding to this grid node structural table, and may be used in above-mentioned steps S908 in returning results for the treatment of facility this locality execution and/or calling of relevant information.
Certainly, those skilled in the art are to be understood that, play the grid node structural table recording the effect of relevant information returning results and serve and also only can comprise partial information in above-mentioned table 1, in addition, this grid node structural table also can show as other forms, or does not occur in a tabular form.But the distortion of the above-mentioned technical scheme in the application design that the application provides, all should be considered as within the protection domain of the application.
And then as shown in figure 11, alternatively, in the embodiment of the present application, step S904 can comprise:
S1102: the configuration file of the pending request correspondence for the treatment of facility inquiry is read operation or write operation with what judge current service execution to be called.
Wherein, by the configuration file being stored in treatment facility this locality, current service to be called can be identified, when the match is successful for the two, namely the relevant information of current service to be called can be reflected by configuration file, what such as configuration file can record this service execution is read operation or write operation, thus, can in step S1102 by current service execution to be called is gone out to the inquiry judging of configuration file be which kind of operation.It should be noted that, in some embodiments of the application, such as, for the network environment of relative closure, above-mentioned configuration file can be static, but in other embodiments of the application, above-mentioned configuration file also can be dynamic, can adjust with the variation of the implementation environment of technical scheme.
Configuration file is outside read operation or write operation what record service execution, can also comprise following content: the descriptor of the data that the call type of service, the descriptor of service, the service of calling affect and be used to indicate whether to be obtained beyond this locality by treatment facility and return results the information be recorded to grid node structural table.Such as, in an embodiment of the application, configuration file can have following form:
(call type of service: the descriptor of service: be used to indicate whether treatment facility to be obtained beyond this locality and return results the information be recorded to grid node structural table: the descriptor of the data that the service of calling affects: the type of the operation of service execution)
Wherein, under a scene, the record of configuration file corresponding with it can be:
(dubbo:com.alifi.venuscore.service.LoanApi.getLoan:Y: request slip: read)
Under this scene, by to the inquiry of configuration file and known, the call type of service can be " dubbo " type (call type defined in a kind of existing network frame), the path of calling of the service that the descriptor of serving embodies can be " com.alifi.venuscore.service.LoanApi.getLoan ", be used to indicate and whether treatment facility obtained beyond this locality that to return results the information grid node structural table of being recorded to can be " Y ", also be "Yes", the descriptor of the data that the service of calling affects can be " request slip ", and the type of the operation of service execution can be " reading ", also i.e. read operation.
As can be seen from the above description, by the configuration to configuration file, whether can be incorporated in grid node structural table service to be called easily, or whether continue step S906, S908 or S910 performed in the disposal route of above-mentioned request and regulate and control.On the other hand, configuration file also may be used for the relevant information recording service with grid node structural table accordingly, thus can using grid node structural table as the data structure dynamically updated when, as the storage medium that retention cycle is relatively grown, serve in step S908 local to calling of returning results from treatment facility.
And then as shown in figure 12, alternatively, in the embodiment of the present application, the operation of the information corresponding with service at this emptying for the treatment of facility described in above-mentioned steps S1002 can comprise:
S1202: search corresponding with the configuration file of serving in grid node structural table, wherein, with service configuration file corresponding in grid node structural table in descriptor and service configuration file in descriptor identical;
S1204: delete the data in the grid node structural table found.
Wherein, by adopting configuration file as with reference to inquire about and deleting the mode of data in the grid node structural table of correspondence, can easy, rapidly described in completing steps S1002 service call for execution write operation complete after the null clear operation that carries out.Certainly, configuration file described in the application can not only for above object, generally speaking, configuration file can define needing the service safeguarded, such as, definition service is read operation or write operation, and the data etc. that read/write operation has influence on, thus can play the effect of management service description.
Alternatively, as shown in figure 13, in the embodiment of the present application, after treatment facility completes above-mentioned request process, the disposal route of the request provided according to the embodiment of the present application can also comprise:
S1302: delete and be stored in returning results for the treatment of facility this locality.
As previously mentioned, in the embodiment of the present application, can using grid node structural table as the data result dynamically updated, be stored in as in the interim storage space of its of distributing, such as, grid node structural table can be distributed in the comparatively faster local cache of data processing speed.Under above-mentioned scene, can in the processing procedure of once asking, meeting the Rule of judgment of preorder and performing when returning results the operation of this locality being stored in treatment facility in step S910, the grid node structural table of the relevant information returned results recording and serve is stored in above-mentioned local cache, and in the processing procedure of this request after call the service of same execution read operation time, in step S908, obtain data from the grid node structural table being arranged in local cache, thus the processing speed of request can be accelerated further.
Under above-mentioned scene, on the other hand, can also after treatment facility executes above-mentioned request, in step S1302, deletion is returned results by what be stored in treatment facility this locality, thus can by the above-mentioned interim storage space for returning results distribution, such as, delete in above-mentioned local cache, thus the storage space of release may be used for the processing procedure of request next time, or use for other processes of system, thus when the disposal route of the request provided according to the embodiment of the present application processes a large amount of requests simultaneously, reach the technique effect of the service efficiency promoting internal memory.
Obviously, those skilled in the art should be understood that, each module of above-mentioned the application or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on network that multiple calculation element forms, alternatively, they can realize with the executable program code of calculation element, thus, they can be stored and be performed by calculation element in the storage device, and in some cases, step shown or described by can performing with the order be different from herein, or they are made into each integrated circuit modules respectively, or the multiple module in them or step are made into single integrated circuit module to realize.Like this, the application is not restricted to any specific hardware and software combination.
The foregoing is only the preferred embodiment of the application, be not limited to the application, for a person skilled in the art, the application can have various modifications and variations.Within all spirit in the application and principle, any amendment done, equivalent replacement, improvement etc., within the protection domain that all should be included in the application.

Claims (10)

1. a disposal route for request, is characterized in that, comprising:
Treatment facility receives pending request, and wherein, described request is at least used to indicate repeatedly to be called same service;
What described treatment facility response described request judged current described service execution to be called is read operation or write operation;
If what described treatment facility judged described current described service execution to be called is described read operation, then described treatment facility judges that local whether storing currently to be called describedly serves corresponding returning results with described;
If described treatment facility judges that this locality returns results described in storing, then obtain described in storing and return results; If described treatment facility judge local do not store described in return results, then call described service to perform described read operation, return results described in acquisition, and to be stored in described treatment facility local by returning results described in getting.
2. method according to claim 1, is characterized in that, described treatment facility response described request judge described current described service execution to be called be read operation or write operation after, also comprise:
If what judge described current described service execution to be called is described write operation, then described treatment facility calls described service to perform described write operation, and serves corresponding information at described this emptying for the treatment of facility with described.
3. method according to claim 1 and 2, it is characterized in that, return results described in described treatment facility using grid node structural table record, wherein, described grid node structural table comprise following one of at least: for call the input parameter of described service, the call type of described service, the descriptor of described service, described request mark, call the descriptor of the data that described service affects.
4. method according to claim 3, is characterized in that, what described treatment facility response described request judged described current described service execution to be called is that read operation or write operation comprise:
The configuration file of the described pending request correspondence of described treatment facility inquiry is read operation or write operation with what judge described current described service execution to be called, wherein, what described configuration file recorded described service execution is read operation or write operation, described configuration file at least comprise following one of at least: the call type of described service, the descriptor of described service, call the descriptor of the data that described service affects, and be used to indicate whether described treatment facility is obtained beyond this locality described in return results the information be recorded to described grid node structural table.
5. method according to claim 3, is characterized in that, empties and serve corresponding information comprise with described in described treatment facility:
Search corresponding with the described configuration file of described service in grid node structural table, wherein, the descriptor in the descriptor in the grid node structural table in corresponding with the described configuration file of described service and the described configuration file of described service is identical;
Delete the data in the described grid node structural table found.
6. the method according to any one of claim 1,2,4,5, is characterized in that, after described treatment facility completes described request process, also comprises:
Delete to be stored in described in described treatment facility this locality and return results.
7. a treatment facility for request, is characterized in that, comprising:
Receiving element, for receiving pending request, wherein, described request is at least used to indicate repeatedly to be called same service;
First judging unit is read operation or write operation for what respond that described request judges current described service execution to be called;
Second judging unit, for judge described current described service execution to be called at described first judging unit be described read operation time, judge that local whether storing currently to be called describedly serves corresponding returning results with described;
First performance element, for judge at described second judging unit this locality store described in return results time, obtain store described in return results; And for judge at described second judging unit local do not store described in return results time, call described service to perform described read operation, return results described in acquisition, and to be stored in described treatment facility local by returning results described in getting.
8. equipment according to claim 7, is characterized in that, also comprises:
Second performance element, for judge described current described service execution to be called be described write operation time, call described service to perform described write operation, and serve corresponding information at described this emptying for the treatment of facility with described.
9. the equipment according to claim 7 or 8, it is characterized in that, return results described in described treatment facility using grid node structural table record, wherein, described grid node structural table comprise following one of at least: for call the input parameter of described service, the call type of described service, the descriptor of described service, described request mark, call the descriptor of the data that described service affects.
10. equipment according to claim 9, is characterized in that, described first judging unit comprises:
Enquiry module, read operation or write operation for inquiring about configuration file corresponding to described pending request with what judge described current described service execution to be called, wherein, what described configuration file recorded described service execution is read operation or write operation, described configuration file at least comprise following one of at least: the call type of described service, the descriptor of described service, call the descriptor of the data that described service affects, and be used to indicate whether described treatment facility is obtained beyond this locality described in return results the information be recorded to described grid node structural table.
CN201310379490.6A 2013-08-27 2013-08-27 The processing method and processing equipment of request Active CN104423982B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310379490.6A CN104423982B (en) 2013-08-27 2013-08-27 The processing method and processing equipment of request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310379490.6A CN104423982B (en) 2013-08-27 2013-08-27 The processing method and processing equipment of request

Publications (2)

Publication Number Publication Date
CN104423982A true CN104423982A (en) 2015-03-18
CN104423982B CN104423982B (en) 2018-03-06

Family

ID=52973064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310379490.6A Active CN104423982B (en) 2013-08-27 2013-08-27 The processing method and processing equipment of request

Country Status (1)

Country Link
CN (1) CN104423982B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106936921A (en) * 2017-04-06 2017-07-07 福建新大陆软件工程有限公司 A kind of network request buffered method and system
CN107273216A (en) * 2016-04-08 2017-10-20 阿里巴巴集团控股有限公司 A kind of processing method of request of data, apparatus and system
CN108280091A (en) * 2017-01-06 2018-07-13 阿里巴巴集团控股有限公司 A kind of task requests execution method and apparatus
CN108712498A (en) * 2018-05-23 2018-10-26 新华三大数据技术有限公司 The call method and device of service
CN109491765A (en) * 2018-10-09 2019-03-19 阿里巴巴集团控股有限公司 To the processing method and processing device of cross-domain service request
CN110535966A (en) * 2019-09-05 2019-12-03 腾讯科技(深圳)有限公司 A kind of data processing method and relevant device
CN111367683A (en) * 2018-12-25 2020-07-03 华为技术有限公司 Result obtaining method, device and equipment
CN114257652A (en) * 2021-12-10 2022-03-29 中信银行股份有限公司 Request message processing method, device, equipment and readable storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5832262A (en) * 1995-09-14 1998-11-03 Lockheed Martin Corporation Realtime hardware scheduler utilizing processor message passing and queue management cells
US20010049762A1 (en) * 2000-06-01 2001-12-06 Akihiko Ohwada Operation processing apparatus
US20050015515A1 (en) * 2003-05-23 2005-01-20 Heppenstall Mark F. Method and apparatus for transferring data across a protocol bridge
CN101512527A (en) * 2006-10-05 2009-08-19 国际商业机器公司 Data processing system and method of handling requests
CN102073539A (en) * 2010-12-02 2011-05-25 华为技术有限公司 Queue request processing method and device
CN102495710A (en) * 2011-10-25 2012-06-13 曙光信息产业(北京)有限公司 Method for processing data read-only accessing request
CN102541659A (en) * 2011-12-30 2012-07-04 重庆新媒农信科技有限公司 Method and device for processing of server service requests
CN102804158A (en) * 2010-03-19 2012-11-28 想象技术有限公司 Requests and data handling in bus architecture
CN103152433A (en) * 2013-01-14 2013-06-12 广东电子工业研究院有限公司 Distributed server side framework and use, interaction and request processing method thereof
CN103207841A (en) * 2013-03-06 2013-07-17 青岛海信传媒网络技术有限公司 Method and device for data reading and writing on basis of key-value buffer
CN103995674A (en) * 2014-04-17 2014-08-20 华为技术有限公司 Method, device and equipment for processing access requests

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5832262A (en) * 1995-09-14 1998-11-03 Lockheed Martin Corporation Realtime hardware scheduler utilizing processor message passing and queue management cells
US20010049762A1 (en) * 2000-06-01 2001-12-06 Akihiko Ohwada Operation processing apparatus
US20050015515A1 (en) * 2003-05-23 2005-01-20 Heppenstall Mark F. Method and apparatus for transferring data across a protocol bridge
CN101512527A (en) * 2006-10-05 2009-08-19 国际商业机器公司 Data processing system and method of handling requests
CN102804158A (en) * 2010-03-19 2012-11-28 想象技术有限公司 Requests and data handling in bus architecture
CN102073539A (en) * 2010-12-02 2011-05-25 华为技术有限公司 Queue request processing method and device
CN102495710A (en) * 2011-10-25 2012-06-13 曙光信息产业(北京)有限公司 Method for processing data read-only accessing request
CN102541659A (en) * 2011-12-30 2012-07-04 重庆新媒农信科技有限公司 Method and device for processing of server service requests
CN103152433A (en) * 2013-01-14 2013-06-12 广东电子工业研究院有限公司 Distributed server side framework and use, interaction and request processing method thereof
CN103207841A (en) * 2013-03-06 2013-07-17 青岛海信传媒网络技术有限公司 Method and device for data reading and writing on basis of key-value buffer
CN103995674A (en) * 2014-04-17 2014-08-20 华为技术有限公司 Method, device and equipment for processing access requests

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273216A (en) * 2016-04-08 2017-10-20 阿里巴巴集团控股有限公司 A kind of processing method of request of data, apparatus and system
CN107273216B (en) * 2016-04-08 2020-10-13 阿里巴巴集团控股有限公司 Data request processing method, device and system
CN108280091A (en) * 2017-01-06 2018-07-13 阿里巴巴集团控股有限公司 A kind of task requests execution method and apparatus
CN106936921A (en) * 2017-04-06 2017-07-07 福建新大陆软件工程有限公司 A kind of network request buffered method and system
CN108712498A (en) * 2018-05-23 2018-10-26 新华三大数据技术有限公司 The call method and device of service
CN109491765A (en) * 2018-10-09 2019-03-19 阿里巴巴集团控股有限公司 To the processing method and processing device of cross-domain service request
CN109491765B (en) * 2018-10-09 2021-07-30 创新先进技术有限公司 Method and device for processing cross-domain service request
CN111367683A (en) * 2018-12-25 2020-07-03 华为技术有限公司 Result obtaining method, device and equipment
CN110535966A (en) * 2019-09-05 2019-12-03 腾讯科技(深圳)有限公司 A kind of data processing method and relevant device
CN110535966B (en) * 2019-09-05 2021-06-15 腾讯科技(深圳)有限公司 Data processing method and related equipment
CN114257652A (en) * 2021-12-10 2022-03-29 中信银行股份有限公司 Request message processing method, device, equipment and readable storage medium
CN114257652B (en) * 2021-12-10 2024-01-30 中信银行股份有限公司 Request message processing method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN104423982B (en) 2018-03-06

Similar Documents

Publication Publication Date Title
CN107391653B (en) Distributed NewSQL database system and picture data storage method
CN109254733B (en) Method, device and system for storing data
CN104423982A (en) Request processing method and device
US9678969B2 (en) Metadata updating method and apparatus based on columnar storage in distributed file system, and host
KR102311032B1 (en) Database Synchronization
CN104850572A (en) HBase non-primary key index building and inquiring method and system
US9135572B2 (en) Method and arrangement for processing data
KR20170123336A (en) File manipulation method and apparatus
CN109690522B (en) Data updating method and device based on B+ tree index and storage device
CN104881466A (en) Method and device for processing data fragments and deleting garbage files
CN109815240B (en) Method, apparatus, device and storage medium for managing index
CN110737682A (en) cache operation method, device, storage medium and electronic equipment
CN103886109A (en) Method and device for realizing row lock of database
CN108037967A (en) A kind of menu loading method and electronic equipment based on more parent-child structures
US10747773B2 (en) Database management system, computer, and database management method
US20090100082A1 (en) Replication and mapping mechanism for recreating memory durations
CN111046106A (en) Cache data synchronization method, device, equipment and medium
CN110222046B (en) List data processing method, device, server and storage medium
WO2020192663A1 (en) Data management method and related device
CN109614411B (en) Data storage method, device and storage medium
CN110020272A (en) Caching method, device and computer storage medium
US20220342888A1 (en) Object tagging
CN112685417B (en) Database operation method, system, device, server and storage medium
US11157506B2 (en) Multiform persistence abstraction
CN111752941B (en) Data storage and access method and device, server and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20191210

Address after: P.O. Box 31119, grand exhibition hall, hibiscus street, 802 West Bay Road, Grand Cayman, Cayman Islands

Patentee after: Innovative advanced technology Co., Ltd

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: Alibaba Group Holding Co., Ltd.

TR01 Transfer of patent right