CN103401909A - Data interaction method and system based on BS (browser/server), client end and server - Google Patents
Data interaction method and system based on BS (browser/server), client end and server Download PDFInfo
- Publication number
- CN103401909A CN103401909A CN2013103139562A CN201310313956A CN103401909A CN 103401909 A CN103401909 A CN 103401909A CN 2013103139562 A CN2013103139562 A CN 2013103139562A CN 201310313956 A CN201310313956 A CN 201310313956A CN 103401909 A CN103401909 A CN 103401909A
- Authority
- CN
- China
- Prior art keywords
- request
- data
- msg
- results
- server
- 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
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the invention discloses a data interaction method and a data interaction system based on a BS (browser/server), a client end and a server, relating to the technical field of communication transmission. By adopting the method and the system, the client end and the server, time, energy and cost required to be consumed can be reduced during operating, updating and maintaining an application system. The data interaction method based on the BS comprises the following steps that the client end defines a transmission rule, at least two request data are defined according to the transmission rule, the at least two request data are combined to obtain combination data, and the combination data are sent to the server; the server is used for receiving the combination data sent by the client end, at least two request data are obtained from the combination data, the request data are subjected to processing to obtain at least two request results, the at least two request results are combined to obtain feedback data, and the feedback data are sent to the client end; the client end is used for receiving the feedback data, and the request results are extracted from the feedback data to be displayed. The method and the system, the client end and the server are suitable for the place where multiple times of data interaction are carried out between the client end and the server.
Description
Technical field
The present invention relates to the communication transmission technology field, relate in particular to data interactive method and system, client and server based on BS.
Background technology
At great majority based on BS(Browser/Server, Browser/Server Mode) in the development and Design of the WEB application systems soft ware of structure, the design of employing three-decker, three layers mean respectively layer, Business Logic and data access layer from top to bottom, between each layer, be the weak coupling structure, dependence between layers is downward, and wherein presentation layer depends on Business Logic, and Business Logic depends on data access layer.Application system is in order to complete certain function, and the functional module of client need to send request data to the data access request interface of server.In architecture design, the data access request interface is positioned at the data access layer of server, by the division of server according to the client functionality module, provided, designing a data access interface needs according to the quantity, kind and the relation between them that realize concrete function and the module data of an application system.At present, the scheme of mutual request msg is mainly between the server and client side: repeatedly request, for example, the functional module of interface display has three, so just by client according to module data relation three times to the server request data, this process be equivalent to carry out between client browser and server three times mutual.But the interaction times between the server and client side increases, and can increase request total time used, thereby affects the speed of interface display.
At present; in order to solve the problem of the required overlong time of above-mentioned mutual request msg; usually can increase new data access request interface at server; if carry out a complete function, need a plurality of functional modules; newly-increased request of data interface must design according to the relation of a plurality of functional modules of supporting this complete function; thereby make while realizing this function, client only need be carried out a data interaction with server.
The problem that prior art exists:
in application system, move, upgrade and while safeguarding, often can change the quantity of client functionality module or server service functional module, kind and the correlation between them, will change like this transfer of data flow process between presentation layer and Business Logic, thereby changed the original framework of application system, to new data access interface, also to carry out synchronous modification, concerning exploitation staff and user, this can be the application system operation, upgrade and safeguard and bring larger difficulty, expend more time energy, increased the application system operation, the cost that upgrades and safeguard.
Summary of the invention
Embodiments of the invention provide based on the data interactive method of BS and system, client and server, the complexity in the time of can reducing the application system operation, upgrade or safeguard, thus reduce the cost that application system is upgraded or safeguarded.
For achieving the above object, embodiments of the invention adopt following technical scheme:
On the one hand, the embodiment of the present invention provides a kind of data interactive method based on BS, comprising:
Client determines to import into rule, and determine at least two request msgs according to the described rule of importing into, described at least two request msgs are merged, and obtain merging data, and described merging data is sent to described order and the relation of importing between each request msg of Rule Expression to server;
Described server receives merging data, from described merging data, obtaining described at least two request msgs, and each request msg is processed and obtained at least two request results, again described at least two request results are merged and obtain feedback data, and send described feedback data to client;
The feedback data that the described server of described client sends, according to the described rule of importing into, from described feedback data, extract described at least two request results, wherein, a request results, corresponding at least one request msg, shows at least one received request results.
On the other hand, the embodiment of the present invention provides a kind of data interaction system based on BS, comprises client and server, comprising:
Described client is for determining to import into rule, and determine at least two request msgs according to the described rule of importing into, described order and the relation of importing between each request msg of Rule Expression, described at least two request msgs are merged, and obtain merging data, described merging data is sent to server;
Described server is for receiving merging data, from described merging data, obtaining described at least two request msgs, and each request msg is processed and obtained at least two request results, again described at least two request results are merged and obtain feedback data, and send described feedback data to client;
The feedback data that described client also sends be used to receiving described server, according to the described rule of importing into, from described feedback data, extract described at least two request results, wherein, a request results, corresponding at least one request msg, shows at least one received request results.
On the one hand, the embodiment of the present invention provides a kind of client, comprising again:
The acquisition request module, be used to determining to import into rule, and determine at least two request msgs, described order and the relation of importing between each request msg of Rule Expression according to the described rule of importing into;
Merge module, for described at least two request msgs are merged, and obtain merging data;
Sending module, for sending described merging data to server;
Receiver module, the feedback data that sends for receiving described server, described feedback data is from described merging data, obtaining described at least two request msgs by described server, and each request msg processed and obtain at least two request results, more described at least two request results are merged and obtain;
Decomposing module, for according to the described rule of importing into, from described feedback data, extracting described at least two request results, wherein, a request results is corresponding at least one request msg;
Display module, be used to showing at least one received request results.
Another aspect, the embodiment of the present invention provide a kind of server, comprise a kind of service logic data access manager, and described service logic data access manager comprises:
Receiver module, the merging data that sends be used to receiving client;
The requirement analysis module, for from described merging data, obtaining described at least two request msgs, described at least two request msgs are determined according to importing rule into by described client, described order and the relation of importing between each request msg of Rule Expression;
Processing module, for processing and obtain at least two request results each request msg;
Request results merges module, be used to merging described at least two request results, obtains feedback data;
Sending module, for sending described feedback data to described client.
the data interactive method based on BS that the embodiment of the present invention provides and system, client and server, can merge a plurality of request msgs in client, and the request msg of merging is sent to server, the request msg that server is combined is decomposed and is obtained described a plurality of request msg, to each request msg, process and obtain request results, after being merged, request results sends to client, make client obtain the request results of server feedback, thereby make client in system only need carry out a data interaction with server and many request msgs can be sent to server, and server also only need once feed back, request results can be back to client.Scheme provided by the invention, can be in the situation that needs carry out repeatedly request of data, interaction times in the minimizing system between client and server, and do not need to increase new data access interface, avoided in the prior art increasing in order to reduce request number of times extra interface, cause the problem of Business Logic complexity increase, thereby reduced the complexity of system, improved the reliability of system.And owing to having avoided increasing the quantity of interface, thereby time energy and the cost that need to expend have been reduced when application system is moved, upgrades and safeguarded.
The accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below will the accompanying drawing of required use in embodiment be briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The structural representation of a kind of system architecture that Fig. 1 provides for the embodiment of the present invention;
The flow chart of a kind of data interactive method based on BS that Fig. 2 provides for the embodiment of the present invention;
The another kind that Fig. 3 provides for the embodiment of the present invention is based on the flow chart of the data interactive method of BS;
The flow chart of a kind of implementation of a kind of data interactive method based on BS that Fig. 4 provides for the embodiment of the present invention;
The structural representation of a kind of data interaction system based on BS that Fig. 5 provides for the embodiment of the present invention;
The structural representation of a kind of client that Fig. 6 provides for the embodiment of the present invention;
The structural representation of a kind of server that Fig. 7 provides for the embodiment of the present invention;
The structural representation of the another kind of server that Fig. 8 provides for the embodiment of the present invention;
A kind of structural representation of module in a kind of server that Fig. 9 provides for the embodiment of the present invention;
A kind of structural representation of unit in a kind of server that Figure 10 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills, not making all other embodiment that obtain under the creative work prerequisite, belong to the scope of protection of the invention.
The technical scheme that the embodiment of the present invention provides can be applied to the system based on the WEB framework of BS, as shown in Figure 1, wherein can comprise client and server.Client can be the terminal equipments such as mobile phone, PC and PAD.In client, can comprise the merging request manager, the merging request manager of client can be merged into two request msgs a merging data at least, and is sent to server; The feedback data that client can also reception server sends over, and decomposition is obtained at least two request results, a request results is that a request msg obtains after treatment on server.Server can comprise service logic data access manager, the merging data that the service logic data management system of server sends client decomposes and obtains each request msg, and each request msg is processed, and obtain the request results of each request msg, again at least two request results are merged into to feedback data, and be sent to client.
The embodiment of the present invention provides a kind of data interactive method based on BS, and the method can be for the architecture system of the WEB based on BS shown in Figure 1.As shown in Figure 2, the method can comprise:
201, client determines to import into rule, and determines at least two request msgs according to the described rule of importing into.
Wherein, import order and the relation between each request msg of Rule Expression into.Concrete, importing rule into can comprise: the Output rusults of the request msg of front serves as the parameter in the request msg processing procedure of back, and collaborative back request msg produces its Output rusults.For example: the processing of request msg 2 depends on request msg 1, and after request msg 2 is positioned at request msg 1, server is when processing request msg 2, need will before process Output rusults that request msg 1 the obtains parameter as request msg 2, just can correctly produce the Output rusults of request msg 2.Such as: in a Students'Management System, need the inquiry student information, and the request of inquiry student information is based on the request results of class's inquiry, at this moment, the request results of class's inquiry is exactly the parameter in the request processing procedure of inquiry student information.
Wherein, between each request msg, can adopt the mode of array to be cascaded, the call back function of the request msg that the correspondence of each in array is relevant, call back function is for the call request data.Request msg comprises the address of request, the identification number of request and the parameter list of request.For instance, two request msgs are request msg 1 and request msg 2, adopt the array mode to connect two request msgs, obtain array a, array a comprises two items, respectively a[1] and a[2], a[1] corresponding be the call back function of request msg 1, a[2] corresponding be the call back function of request msg 2.
202, described client merges described at least two request msgs, and obtains merging data.
Wherein, client merges two request msgs at least according to a definite sequence, obtains merging data, simultaneously, records order and relation that at least two request msgs merge.
203, described client sends described merging data to server.
Wherein, merging data sends and needs through data-interface to server, data-interface can be simple transmission channel, merging data and common single request data can be identical by the mode of data-interface, therefore do not need to revise or change the framework of original application system, reduced the complexity of application system.
Optionally, merging data can also comprise identification information, and identification information is merged and obtained by at least two request msgs for representing merging data.Client can come merging data and single request data separation by identification marking information, guarantees that the processing procedure in later stage is carried out more efficiently.For example: function 1 needs request msg 1 and request msg 2 to support to complete, and 2 needs request msgs of function 3 are supported to complete.When request msg 1 and request msg 2 are merged into merging data, can specify an identification information for merging data, this identification information makes merging data to make a distinction with request msg 3.
204, described server receives merging data.
205, described server is from obtaining described at least two request msgs described merging data.
Wherein, server can be according to client at 202 inverse process that obtain merging data, from merging data, decomposing and obtain at least two request msgs.
206, described server is processed and is obtained at least two request results each request msg.
Wherein, server can the record request data required parameter and request address etc., if there is no continuous relationship between each request msg, by the business function module of carrying out corresponding function, read respectively and process each corresponding request msg, obtain the request results corresponding with request msg.If have continuous relationship between each request msg, for example: request msg 2 is undertaken in request msg 1, carry out the business function module of corresponding function when processing request msg 2, also need to process the request results 1 that request msg 1 obtains by other business function module, just can obtain request results 2, request results 2 can represent that request msg 1 and request msg 2 are all through processing.
207, described server merges and obtains feedback data described at least two request results, and sends described feedback data to client.
wherein, server merges the specific implementation that at least two request results obtain feedback data, can be identical or corresponding in 202 modes that at least two request msgs are merged with client, wherein correspondingly refer to packaged type that server merges request results can in 202, to merge with client the packaged type of request msg identical, or the client concrete mode that merges request msg in 202 is the scheme that has adopted in the existing protocol specially for the treatment of request msg, and the concrete mode of server merging request results is special scheme for the treatment of request results in existing protocol.
208, the feedback data that the described server of described client sends.
209, described client is extracted described at least two request results according to the described rule of importing into from described feedback data.
Wherein, a request results can be corresponding at least one request msg, and client can merge to request results the inverse process that obtains feedback data according to server in 207, from feedback data, extracting at least two request results.Specifically, a request results can be only corresponding to a request msg, such as: certain function of application system needs the support of request msg 1 and request msg 2 just can complete, but between request msg 1 and request msg 2, there is no continuous relationship, corresponding one by one with request msg 1, request msg 2 successively from the request results 1 that obtains feedback data, request results 2.A request results also can be corresponding to a plurality of request msgs, such as: certain function of application system needs request msg 1, request msg 2 and request msg 3 to support just can complete, and request msg 3 is undertaken in request msg 1 and request msg 2, as the processing for request msg 3, need request results 1 and request results 2 as parameter, also can be corresponding to the processing of request msg 1,2,3 from the request results 3 that obtains feedback data.
210, described client shows at least one received request results.
Wherein, after feedback data, obtaining at least two request results, each request results can be returned to its corresponding interface function module that is in presentation layer, thereby on the display device at interface, demonstrates result or the data that obtain.
The data interactive method based on BS that the embodiment of the present invention provides, can merge a plurality of request msgs in client, and the request msg of merging is sent to server, simultaneously, client can also come merging data and single request data separation by identification marking information, guarantees that the processing procedure in later stage is carried out more efficiently.The request msg that server is combined is decomposed and is obtained a plurality of request msgs, to each request msg, process and obtain request results, after being merged, request results sends to client, client obtains the request results of server feedback, in this process, each request results is corresponding with at least one request msg, has guaranteed the correctness of processing and transmitting procedure.Scheme provided by the invention, can be in the situation that needs carry out repeatedly request of data, reduce the interaction times between client and server, and do not need to increase new data access interface, avoided in the prior art increasing in order to reduce request number of times extra interface, cause the problem of Business Logic complexity increase, thereby reduced the complexity of system, improved the reliability of system.And owing to having avoided increasing the quantity of interface, thereby time energy and the cost that need to expend have been reduced when application system is moved, upgrades and safeguarded.
On the basis of as shown in Figure 2 method, the embodiment of the present invention also provides a kind of data interactive method based on BS, as shown in Figure 3, can comprise:
301, client determines to import into rule, and determines at least two request msgs according to the described rule of importing into.
Wherein, import order and the relation between each request msg of Rule Expression into.
302, described client merges described at least two request msgs, and obtains merging data.
303, described client sends described merging data to server.
304, all request msgs that the described client of described server interception sends.
Wherein, all request msgs of client transmission can comprise merging data and single request data.Merging data can also comprise identification information, and identification information is merged and obtained by at least two request msgs for representing merging data.By all request msg interceptions, all request msgs are identified, the request msg with identification information is merging data herein; The request msg that does not recognize identification information is the single request data, can directly transfer to corresponding business function module, and processes according to technological means commonly used.
305, described server is from the request msg of interception, determining to have the request msg of described identification information, and the request msg that will have a described identification information is as described merging data.
306, described server is from obtaining described at least two request msgs described merging data.
307, described server by utilizing request dynamic proxy, process for described each request msg according to the described rule of importing into, and obtain described at least two request results.
Wherein, the request dynamic proxy of server foundation can be taken over the input of business function module.Business function module need to read the request msg that client sends by the request dynamic proxy.Wherein, the request dynamic proxy can read each request msg by the call parameters manager, and the request dynamic proxy is distributed to the corresponding request msg of business function module according to the function of business function module.Illustrate, business function module 1 needs to receive request msg 1 and processes, business function module 2 needs to receive request msg 2 and processes, the request dynamic proxy is by call parameters manager read requests data 1 and request msg 2, by the request dynamic proxy, request msg 1 is distributed to business function module 1 and process, request msg 2 is distributed to business function module 2 and process.
Server can also be set up the response dynamic proxy, by the response dynamic proxy, is taken over the output of business function module.For example: after business function module completed and processes and obtain request results at least two request msgs, the request results that correspondence is obtained outputed in the response dynamic proxy.
308, described server merges and obtains feedback data described at least two request results, and sends described feedback data to client.
Wherein, the embodiment that merges request results can be identical with 207, repeats no more herein.
309, the feedback data that the described server of described client sends.
310, described client is extracted described at least two request results according to the described rule of importing into from described feedback data.
311, described client shows at least one received request results.
The data interactive method based on BS that the embodiment of the present invention provides, can merge a plurality of request msgs in client, and the request msg of merging is sent to server, server can be tackled all request msgs that client sends, and identify merging data by identification information, be combined the mode that data are different with the single request data application and process, thereby needn't revise or change the framework of application system; Server uses request dynamic proxy and response dynamic proxy to take over the input and output of business function module, and dynamic proxy can the call parameters manager, each request msg can also be distributed to corresponding business function module.Scheme provided by the invention, can be in the situation that needs carry out repeatedly request of data, reduce the interaction times between client and server, and do not need to increase new data access interface, avoided in the prior art increasing in order to reduce request number of times extra interface, cause the problem of Business Logic complexity increase, thereby reduced the complexity of system, improved the reliability of system.And owing to having avoided increasing the quantity of interface, thereby time energy and the cost that need to expend have been reduced when application system is moved, upgrades and safeguarded.
For instance, as shown in Figure 4,307 specific implementation can comprise:
3071, according to the described rule of importing into, in described each request msg, determine the first request msg.
Wherein, each request msg comprises the first request msg to the N request msg, N is the integer more than or equal to 2, between the first request msg to the N request msg, there is continuous relationship, and for the request msg of back, accept the request msg of front, for example: the second request msg is undertaken in the first request msg, and the request results of the first request msg is served as the parameter that obtains the second request results.
3072, utilize described request dynamic proxy call parameters manager to process described the first request msg, and obtain the first request results, and described the first request results is stored in described parameter management device.
3073, utilize described request dynamic proxy to call described parameter management device and according to described the first request results, the second request msg is processed, and obtain the second request results, and described the second request results is stored in described parameter management device.
In the present embodiment, server can utilize described request dynamic proxy call parameters manager to repeat the execution mode of 3071-3073, successively each request msg is processed, until obtain the N request results, and in the process of processing for a request msg, from described parameter management device, obtaining at least one, process the request results that other request msgs obtain, and by described at least one process the request results that other request msgs obtain, as the parameter that participates in this request msg and process.For example, request msg 3 is undertaken in request msg 1 and request msg 2, request msg 1 corresponding requests result 1, request msg 2 corresponding requests results 2, request msg 3 corresponding requests results 3.While processing request msg 3 so, need to utilize request results 1 and request results 2 in request dynamic proxy call parameters manager, changing request results 1, request results 2 and request msg 3 over to business function module processes, obtain request results 3, export request results 3 to the response dynamic proxy, the parameter management device reads the request results 3 in the response dynamic proxy, and stores.Such as: in a Students'Management System, need the inquiry student information, and the request of inquiry student information is based on grade's inquiry request result and class's inquiry request result.When the inquiry student information, the request dynamic proxy can call grade's inquiry request result and the class's inquiry request result that is buffered in the parameter management device, changing student information inquiry request, grade's inquiry request result and class's inquiry request result over to business function module processes, obtain inquiring about the request results of student information, export the request results of inquiry student information to the response dynamic proxy, the parameter management device can read the request results of the inquiry student information in the response dynamic proxy, and stores.
The data interactive method based on BS that the embodiment of the present invention provides, for having the request msg of continuous relationship, utilize request msg and request results in request dynamic proxy call parameters manager, the parameter management device reads the request results in the response dynamic proxy, has taken in a dynamic way the input and output of business function module.Scheme provided by the invention, can be in the situation that needs carry out repeatedly request of data, reduce the interaction times between client and server, and do not need to increase new data access interface, avoided in the prior art increasing in order to reduce request number of times extra interface, cause the problem of Business Logic complexity increase, thereby reduced the complexity of system, improved the reliability of system.And owing to having avoided increasing the quantity of interface, thereby time energy and the cost that need to expend have been reduced when application system is moved, upgrades and safeguarded.
The embodiment of the present invention also provides a kind of data interaction system based on BS 500, as shown in Figure 5, comprising:
Described client 501, the feedback data that also sends be used to receiving described server, extract described at least two request results according to the described rule of importing into from described feedback data, wherein, a request results, corresponding at least one request msg, shows at least one received request results.
the data interaction system based on BS that the embodiment of the present invention provides, can merge a plurality of request msgs in client, and the request msg of merging is sent to server, the request msg that server is combined is decomposed and is obtained described a plurality of request msg, to each request msg, process and obtain request results, after being merged, request results sends to client, make client obtain the request results of server feedback, thereby make client in system only need carry out a data interaction with server and many request msgs can be sent to server, and server also only need once feed back, request results can be back to client.Scheme provided by the invention, can be in the situation that needs carry out repeatedly request of data, interaction times in the minimizing system between client and server, and do not need to increase new data access interface, avoided in the prior art increasing in order to reduce request number of times extra interface, cause the problem of Business Logic complexity increase, thereby reduced the complexity of system, improved the reliability of system.And owing to having avoided increasing the quantity of interface, thereby time energy and the cost that need to expend have been reduced when application system is moved, upgrades and safeguarded.
The embodiment of the present invention also provides a kind of client 600, as shown in Figure 6, comprising:
Wherein, merge module also at merging data, adding identification information, identification information is merged and is obtained by at least two request msgs for representing merging data.
Sending module 603, for sending described merging data to server.
Wherein, described feedback data be by described server from described merging data, obtaining described at least two request msgs, and each request msg is processed and is obtained at least two request results, more described at least two request results are merged and obtain.
Decomposing module 605, for extracting described at least two request results according to the described rule of importing into from described feedback data.
Wherein, a request results is corresponding at least one request msg.
the client that the embodiment of the present invention provides, can merge a plurality of request msgs in client, and the request msg of merging is sent to server, make client only need carry out a data interaction with server and many request msgs can be sent to server, client can come merging data and single request data separation by identification marking information, the processing procedure that guarantees the later stage is carried out more efficiently, after the feedback data that the client server transmits, can be according to importing rule into from feedback data, extracting at least two request results, each request results is corresponding with at least one request msg, guaranteed the correctness of processing and transmitting procedure.Scheme provided by the invention, can be in the situation that needs carry out repeatedly request of data, reduce the interaction times between client and server, and do not need to increase new data access interface, avoided in the prior art increasing in order to reduce request number of times extra interface, cause the problem of Business Logic complexity increase, thereby reduced the complexity of system, improved the reliability of system.And owing to having avoided increasing the quantity of interface, thereby time energy and the cost that need to expend have been reduced when application system is moved, upgrades and safeguarded.
The embodiment of the present invention also provides a kind of server 700, and it comprises a kind of service logic data access manager 701, and as shown in Figure 7, described service logic data access manager 701 comprises:
Wherein, merging data also comprises identification information, and identification information is merged and obtained by at least two request msgs for representing merging data.
Request results merges module 705, be used to merging described at least two request results, obtains feedback data.
Sending module 706, for sending described feedback data to described client.
The server that the embodiment of the present invention provides, can merge a plurality of request msgs in client, and the request msg of merging is sent to server, the request msg that server is combined is decomposed and is obtained a plurality of request msgs, to each request msg, process and obtain request results, request results is merged after the order obtain merging data merges and sends to client according to request msg, make client obtain the request results of server feedback, guaranteed the correctness of application system feature operation.Scheme provided by the invention, can be in the situation that needs carry out repeatedly request of data, reduce the interaction times between client and server, and do not need to increase new data access interface, avoided in the prior art increasing in order to reduce request number of times extra interface, cause the problem of Business Logic complexity increase, thereby reduced the complexity of system, improved the reliability of system.And owing to having avoided increasing the quantity of interface, thereby time energy and the cost that need to expend have been reduced when application system is moved, upgrades and safeguarded.
On the basis of as shown in Figure 7 server, as shown in Figure 8, described service logic data access manager 701 can also comprise:
Blocking module 707, all request msgs that send be used to tackling described client.
Identification module 708, determine to have the request msg of described identification information for the request msg from interception, and the request msg that will have a described identification information is as described merging data.
For instance, as shown in Figure 9, described processing module 704 can comprise:
Specifically, described server also comprises a kind of parameter management device, and described each request msg comprises the first request msg to the N request msg, and N is the integer more than or equal to 2, and as shown in figure 10, described agent unit 7041 comprises:
Wherein, process subelement 70412, also be used to utilizing request dynamic proxy call parameters manager according to the first request results, the second request msg to be processed, and obtain the second request results, and the second request results is stored in the parameter management device.
Wherein, process subelement 70412, also be used to repeating said process, utilize request dynamic proxy call parameters manager each request msg to be processed until obtain the N request results successively, and in the process of processing for a request msg, from the parameter management device, obtaining at least one, process the request results that other request msgs obtain, and at least one is processed to request results that other request msgs obtain as the parameter that participates in this request msg and process.
The server that the embodiment of the present invention provides, can merge a plurality of request msgs in client, and the request msg of merging is sent to server, server can be tackled all request msgs that client sends, and identify merging data by identification information, be combined the mode that data are different with the single request data application and process, needn't revise or change the framework of application system.Use request dynamic proxy and response dynamic proxy to take over the input and output of business function module, dynamic proxy can the call parameters manager, each request msg can also be distributed to corresponding business function module.Scheme provided by the invention, can be in the situation that needs carry out repeatedly request of data, reduce the interaction times between client and server, and do not need to increase new data access interface, avoided in the prior art increasing in order to reduce request number of times extra interface, cause the problem of Business Logic complexity increase, thereby reduced the complexity of system, improved the reliability of system.And owing to having avoided increasing the quantity of interface, thereby time energy and the cost that need to expend have been reduced when application system is moved, upgrades and safeguarded.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, and between each embodiment, identical similar part is mutually referring to getting final product, and each embodiment stresses is the difference with other embodiment.Especially, for apparatus embodiments, substantially similar in appearance to embodiment of the method, so describe fairly simplely, relevant part gets final product referring to the part explanation of embodiment of the method due to it.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in above-described embodiment method, to come the hardware that instruction is relevant to complete by computer program, described program can be stored in a computer read/write memory medium, this program, when carrying out, can comprise the flow process as the embodiment of above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited to this, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.
Claims (12)
1. the data interactive method based on BS, is characterized in that, comprising:
Client determines to import into rule, and determine at least two request msgs according to the described rule of importing into, described at least two request msgs are merged, and obtain merging data, and described merging data is sent to described order and the relation of importing between each request msg of Rule Expression to server;
Described server receives merging data, from described merging data, obtaining described at least two request msgs, and each request msg is processed and obtained at least two request results, again described at least two request results are merged and obtain feedback data, and send described feedback data to client;
The feedback data that the described server of described client sends, according to the described rule of importing into, from described feedback data, extract described at least two request results, wherein, a request results, corresponding at least one request msg, shows at least one received request results.
2. the data interactive method based on BS according to claim 1, is characterized in that, described merging data also comprises identification information, and described identification information is merged and obtained by at least two request msgs for representing described merging data.
3. the data interactive method based on BS according to claim 1 and 2, is characterized in that, the merging data that described server receives the client transmission comprises:
Tackle all request msgs that described client sends;
From the request msg of interception, determining to have the request msg of described identification information, and the request msg that will have a described identification information is as described merging data.
4. the data interactive method based on BS according to claim 1 and 2, is characterized in that, described each request msg is processed and obtained at least two request results and comprise:
Utilize the request dynamic proxy, according to the described rule of importing into, for described each request msg, process, and obtain described at least two request results.
5. the data interactive method based on BS according to claim 4, it is characterized in that, described each request msg comprises the first request msg to the N request msg, and N is the integer more than or equal to 2, according to the described rule of importing into, for described each request msg, processes and comprises:
According to the described rule of importing into, in described each request msg, determine the first request msg;
Utilize described request dynamic proxy call parameters manager to process described the first request msg, and obtain the first request results, and described the first request results is stored in described parameter management device;
Utilize described request dynamic proxy to call described parameter management device and according to described the first request results, the second request msg is processed, and obtain the second request results, and described the second request results is stored in described parameter management device;
Repeat said process, utilize described request dynamic proxy call parameters manager each request msg to be processed until obtain the N request results successively, and in the process of processing for a request msg, from described parameter management device, obtaining at least one, process the request results that other request msgs obtain, and using described at least one process request results that other request msgs obtain as the parameter that participates in this request msg and process.
6. the data interaction system based on BS, comprise client and server, it is characterized in that, comprising:
Described client is for determining to import into rule, and determine at least two request msgs according to the described rule of importing into, described order and the relation of importing between each request msg of Rule Expression, described at least two request msgs are merged, and obtain merging data, described merging data is sent to server;
Described server is for receiving merging data, from described merging data, obtaining described at least two request msgs, and each request msg is processed and obtained at least two request results, again described at least two request results are merged and obtain feedback data, and send described feedback data to client;
The feedback data that described client also sends be used to receiving described server, according to the described rule of importing into, from described feedback data, extract described at least two request results, wherein, a request results, corresponding at least one request msg, shows at least one received request results.
7. a client, is characterized in that, comprising:
The acquisition request module, be used to determining to import into rule, and determine at least two request msgs, described order and the relation of importing between each request msg of Rule Expression according to the described rule of importing into;
Merge module, for described at least two request msgs are merged, and obtain merging data;
Sending module, for sending described merging data to server;
Receiver module, the feedback data that sends for receiving described server, described feedback data is from described merging data, obtaining described at least two request msgs by described server, and each request msg processed and obtain at least two request results, more described at least two request results are merged and obtain;
Decomposing module, for according to the described rule of importing into, from described feedback data, extracting described at least two request results, wherein, a request results is corresponding at least one request msg;
Display module, be used to showing at least one received request results.
8. client according to claim 7, is characterized in that, described merging module, and also at described merging data, adding identification information, described identification information is merged and is obtained by at least two request msgs for representing described merging data.
9. a server, is characterized in that, comprises a kind of service logic data access manager, and described service logic data access manager comprises:
Receiver module, the merging data that sends be used to receiving client;
The requirement analysis module, for from described merging data, obtaining described at least two request msgs, described at least two request msgs are determined according to importing rule into by described client, described order and the relation of importing between each request msg of Rule Expression;
Processing module, for processing and obtain at least two request results each request msg;
Request results merges module, be used to merging described at least two request results, obtains feedback data;
Sending module, for sending described feedback data to described client.
10. server according to claim 9, is characterized in that, described merging data also comprises identification information, and described identification information is merged and obtained by at least two request msgs for representing described merging data;
Described service logic data access manager also comprises:
Blocking module, all request msgs that send be used to tackling described client;
Identification module, determine to have the request msg of described identification information for the request msg from interception, and the request msg that will have a described identification information is as described merging data.
11. server according to claim 10, is characterized in that, described processing module comprises:
Agent unit, be used to utilizing the request dynamic proxy, process for described each request msg according to the described rule of importing into, and obtain described at least two request results.
12. server according to claim 11, is characterized in that, described server also comprises a kind of parameter management device, and described each request msg comprises the first request msg to the N request msg, and N is the integer more than or equal to 2, and described agent unit comprises:
The promoter unit, for according to the described rule of importing into, determine the first request msg in described each request msg;
Process subelement, be used to utilizing described request dynamic proxy call parameters manager, described the first request msg is processed, and obtained the first request results, and described the first request results is stored in described parameter management device;
Described processing subelement, also be used to utilizing described request dynamic proxy to call described parameter management device, according to described the first request results, the second request msg is processed, and obtain the second request results, and described the second request results is stored in described parameter management device;
Described processing subelement, also be used to repeating said process, utilize described request dynamic proxy call parameters manager each request msg to be processed until obtain the N request results successively, and in the process of processing for a request msg, from described parameter management device, obtaining at least one, process the request results that other request msgs obtain, and using described at least one process request results that other request msgs obtain as the parameter that participates in this request msg and process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310313956.2A CN103401909B (en) | 2013-07-24 | 2013-07-24 | Data interactive method based on BS and system, client and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310313956.2A CN103401909B (en) | 2013-07-24 | 2013-07-24 | Data interactive method based on BS and system, client and server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103401909A true CN103401909A (en) | 2013-11-20 |
CN103401909B CN103401909B (en) | 2017-03-08 |
Family
ID=49565432
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310313956.2A Active CN103401909B (en) | 2013-07-24 | 2013-07-24 | Data interactive method based on BS and system, client and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103401909B (en) |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104270387A (en) * | 2014-10-22 | 2015-01-07 | 中国建设银行股份有限公司 | Information requesting and responding method, client, server and information processing system |
CN106211240A (en) * | 2015-06-01 | 2016-12-07 | 华为技术有限公司 | Improve the method for WLAN WLAN concurrent processing ability, Apparatus and system |
CN106657193A (en) * | 2015-11-02 | 2017-05-10 | 腾讯科技(深圳)有限公司 | Request processing method, request processing device, terminal device and server |
CN106790444A (en) * | 2016-12-06 | 2017-05-31 | 腾讯科技(深圳)有限公司 | Network data exchange method and device |
CN107409149A (en) * | 2016-03-17 | 2017-11-28 | 谷歌公司 | The client-server data of mixing provide |
CN107678794A (en) * | 2017-09-22 | 2018-02-09 | 努比亚技术有限公司 | Application program launching interface merging method and mobile terminal |
CN107733879A (en) * | 2017-09-29 | 2018-02-23 | 努比亚技术有限公司 | Client terminal start-up method, mobile terminal and computer storage media |
CN107766088A (en) * | 2017-09-27 | 2018-03-06 | 努比亚技术有限公司 | Interface optimization method, system and computer-readable recording medium |
CN107872571A (en) * | 2017-10-27 | 2018-04-03 | 努比亚技术有限公司 | Interface requests method, interface requests response method, mobile terminal and server |
CN108259523A (en) * | 2016-12-28 | 2018-07-06 | 阿里巴巴集团控股有限公司 | A kind of data transmission method and Internet of things system, Network Access Method |
CN109614205A (en) * | 2018-10-18 | 2019-04-12 | 阿里巴巴集团控股有限公司 | A kind of method for processing business, device, equipment and system |
CN109637639A (en) * | 2018-11-13 | 2019-04-16 | 张兆芳 | A kind of hospital bed Added Management information system |
CN109842646A (en) * | 2017-11-27 | 2019-06-04 | 北京京东尚科信息技术有限公司 | The treating method and apparatus of network request |
CN111209094A (en) * | 2018-11-21 | 2020-05-29 | 北京小桔科技有限公司 | Request processing method and device, electronic equipment and computer readable storage medium |
CN112926002A (en) * | 2021-03-10 | 2021-06-08 | 工银科技有限公司 | Service request processing method and device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1946016A (en) * | 2006-11-08 | 2007-04-11 | 北京邮电大学 | Merging and repeating method based on cooperation diversity |
CN101354758A (en) * | 2007-07-25 | 2009-01-28 | 中国科学院软件研究所 | System and method for integrating real-time data and relationship data |
CN102184231A (en) * | 2011-05-12 | 2011-09-14 | 广州市动景计算机科技有限公司 | Method and device for acquiring page resources |
CN102387206A (en) * | 2011-10-20 | 2012-03-21 | 镇江睿泰信息科技有限公司 | Synthesis method and system of concurrent request of Web service |
CN102843728A (en) * | 2011-06-22 | 2012-12-26 | 中兴通讯股份有限公司 | Method and system for increasing user downlink and uplink throughput |
-
2013
- 2013-07-24 CN CN201310313956.2A patent/CN103401909B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1946016A (en) * | 2006-11-08 | 2007-04-11 | 北京邮电大学 | Merging and repeating method based on cooperation diversity |
CN101354758A (en) * | 2007-07-25 | 2009-01-28 | 中国科学院软件研究所 | System and method for integrating real-time data and relationship data |
CN102184231A (en) * | 2011-05-12 | 2011-09-14 | 广州市动景计算机科技有限公司 | Method and device for acquiring page resources |
CN102843728A (en) * | 2011-06-22 | 2012-12-26 | 中兴通讯股份有限公司 | Method and system for increasing user downlink and uplink throughput |
CN102387206A (en) * | 2011-10-20 | 2012-03-21 | 镇江睿泰信息科技有限公司 | Synthesis method and system of concurrent request of Web service |
Cited By (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104270387A (en) * | 2014-10-22 | 2015-01-07 | 中国建设银行股份有限公司 | Information requesting and responding method, client, server and information processing system |
CN106211240B (en) * | 2015-06-01 | 2019-06-14 | 华为技术有限公司 | Improve the method, apparatus and system of WLAN WLAN oncurrent processing ability |
CN106211240A (en) * | 2015-06-01 | 2016-12-07 | 华为技术有限公司 | Improve the method for WLAN WLAN concurrent processing ability, Apparatus and system |
WO2016192572A1 (en) * | 2015-06-01 | 2016-12-08 | 华为技术有限公司 | Method, device and system for improving concurrent processing ability of wireless local area network |
US10356841B2 (en) | 2015-06-01 | 2019-07-16 | Huawei Technologies Co., Ltd. | Method, apparatus, and system for enhancing concurrent processing capability of wireless local area network |
CN106657193A (en) * | 2015-11-02 | 2017-05-10 | 腾讯科技(深圳)有限公司 | Request processing method, request processing device, terminal device and server |
CN106657193B (en) * | 2015-11-02 | 2019-11-19 | 腾讯科技(深圳)有限公司 | A kind of request processing method, device, terminal device and server |
CN107409149A (en) * | 2016-03-17 | 2017-11-28 | 谷歌公司 | The client-server data of mixing provide |
CN106790444A (en) * | 2016-12-06 | 2017-05-31 | 腾讯科技(深圳)有限公司 | Network data exchange method and device |
CN108259523A (en) * | 2016-12-28 | 2018-07-06 | 阿里巴巴集团控股有限公司 | A kind of data transmission method and Internet of things system, Network Access Method |
CN108259523B (en) * | 2016-12-28 | 2021-11-02 | 阿里巴巴集团控股有限公司 | Data transmission method, Internet of things system and network access method |
CN107678794B (en) * | 2017-09-22 | 2021-01-01 | 努比亚技术有限公司 | Application program starting interface merging method and mobile terminal |
CN107678794A (en) * | 2017-09-22 | 2018-02-09 | 努比亚技术有限公司 | Application program launching interface merging method and mobile terminal |
CN107766088A (en) * | 2017-09-27 | 2018-03-06 | 努比亚技术有限公司 | Interface optimization method, system and computer-readable recording medium |
CN107733879A (en) * | 2017-09-29 | 2018-02-23 | 努比亚技术有限公司 | Client terminal start-up method, mobile terminal and computer storage media |
CN107872571A (en) * | 2017-10-27 | 2018-04-03 | 努比亚技术有限公司 | Interface requests method, interface requests response method, mobile terminal and server |
CN109842646A (en) * | 2017-11-27 | 2019-06-04 | 北京京东尚科信息技术有限公司 | The treating method and apparatus of network request |
CN109614205A (en) * | 2018-10-18 | 2019-04-12 | 阿里巴巴集团控股有限公司 | A kind of method for processing business, device, equipment and system |
CN109637639A (en) * | 2018-11-13 | 2019-04-16 | 张兆芳 | A kind of hospital bed Added Management information system |
CN111209094A (en) * | 2018-11-21 | 2020-05-29 | 北京小桔科技有限公司 | Request processing method and device, electronic equipment and computer readable storage medium |
CN112926002A (en) * | 2021-03-10 | 2021-06-08 | 工银科技有限公司 | Service request processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN103401909B (en) | 2017-03-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103401909A (en) | Data interaction method and system based on BS (browser/server), client end and server | |
CN101119280B (en) | Method and system for application to multiple clusters | |
CN105787077A (en) | Data synchronizing method and device | |
CN103765423A (en) | Gathering transaction data associated with locally stored data files | |
CN111949614B (en) | Bank system file conversion method and device | |
CN101697139A (en) | Method, device and registry for remote procedure call | |
CN102843436A (en) | Method, equipment, server and system of equipment management | |
CN101436148A (en) | Integrated client end and method for performing interaction of desktop application and network WEB application | |
CN101383839A (en) | Data distribution system based on data server and implementation method | |
CN103139157A (en) | Network communication method based on socket, device and system | |
CN105302925A (en) | Method and device for pushing voice search data | |
CN111476015A (en) | Document processing method and device, electronic equipment and storage medium | |
CN103338218A (en) | Providing client and service compatibility through cloud-hosted adapters | |
CN110083468A (en) | A kind of data transmission method, electronic device and storage medium | |
CN102571923A (en) | Data synchronization system and method | |
CN102946404A (en) | Method for displaying selectively-synchronized file folders at user terminal and cloud storage system | |
CN104065679A (en) | Method for remote desktop operation, and client | |
CN109086365A (en) | local file sharing method, system, device, electronic equipment and storage medium | |
CN111343220B (en) | Repeater, distributed file transmission method, distributed file transmission system, medium and electronic equipment | |
CN103746904A (en) | Information interaction method and device | |
CN110022323A (en) | A kind of method and system of the cross-terminal real-time, interactive based on WebSocket and Redux | |
CN103135953A (en) | Electronic device and multi-panel interface display method | |
CN102624876A (en) | Data configuration method and data configuration device | |
CN111241044A (en) | Method, device and equipment for building heterogeneous database and readable storage medium | |
CN104079368B (en) | A kind of the test data transmission method and server of application software |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |