CN103401909B - Data interactive method based on BS and system, client and server - Google Patents

Data interactive method based on BS and system, client and server Download PDF

Info

Publication number
CN103401909B
CN103401909B CN201310313956.2A CN201310313956A CN103401909B CN 103401909 B CN103401909 B CN 103401909B CN 201310313956 A CN201310313956 A CN 201310313956A CN 103401909 B CN103401909 B CN 103401909B
Authority
CN
China
Prior art keywords
request
data
results
merging
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310313956.2A
Other languages
Chinese (zh)
Other versions
CN103401909A (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.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN201310313956.2A priority Critical patent/CN103401909B/en
Publication of CN103401909A publication Critical patent/CN103401909A/en
Application granted granted Critical
Publication of CN103401909B publication Critical patent/CN103401909B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a kind of data interactive method based on BS and system, client and server, it is related to communication transmission technology field, can reduce when application system is run, updated and safeguard, need time energy and the cost expending.The method of the present invention includes:A kind of data interactive method based on BS, including:Client determines incoming rule, determines at least two request datas according to incoming rule, is merged, obtain merging data, merging data is sent to server;Server receives the merging data that client sends, and obtains at least two request datas, carry out process to each request data and obtain at least two request results, merged, obtain feedback data from merging data, and feedback data is sent to client;Client receives feedback data, therefrom extracts request results and shows.The present invention is applicable to carry out the scene of multiple data interaction between a client and a server.

Description

Data interactive method based on BS and system, client and server
Technical field
The present invention relates to communication transmission technology field, the more particularly, to data interactive method based on BS and system, client And server.
Background technology
It is based on BS in great majority(Browser/Server, Browser/Server Mode)The WEB application systems soft ware of structure Exploitation design in, using three-decker design, three layers be respectively from top to bottom expression layer, Business Logic data access Layer, is in weak coupling structure between each layer, dependence between layers is downward, and wherein expression layer depends on Business Logic, Business Logic depends on data access layer.Application system needs to clothes to complete certain function, the functional module of client The data access request interface of business device sends request data.In architecture design, data access request interface is located at server Data access layer, to be provided according to the division of client functionality module by server, one data access interface of design need according to Factually show the concrete function of an application system and the quantity of module data, species and the relation between them.At present, in clothes Between business device and client, the scheme of interactive demand signal is mainly:Repeatedly ask, for example, the functional module of interface display has three Individual, then just from client according to module data relation in three times to server request data, this process is equivalent in client Three interactions have been carried out between the browser and server of end.But, the interaction times between server and client side increase, and can increase Plus the total time that request is used, thus affecting the speed of interface display.
At present, in order to solve the problems, such as overlong time needed for above-mentioned interactive demand signal it will usually increase in server New data access request interface, if carrying out a complete function to need multiple functional modules, newly-increased request of data connects Mouth must be designed according to the relation of the multiple functional modules supporting this complete function, so that realizing this function When, client only need to carry out a data interaction with server.
The problem that prior art exists:
When application system is run, updated and safeguard, often change client functionality module or server service function The quantity of module, species and the mutual relation between them, thus can change the data between expression layer and Business Logic Transfer process, thus changing the original framework of application system, the modification also to be synchronized to new data access interface, right For development personnel and user, this can run for application system, updates and safeguard and bring bigger difficulty, expend more Time energy, increased application system run, update and safeguard cost.
Content of the invention
The embodiment provides the data interactive method based on BS and system, client and server, can drop Complexity when low application system is run, updates or safeguard, thus reduce the cost that application system is updated or safeguards.
For reaching above-mentioned purpose, embodiments of the invention adopt the following technical scheme that:
On the one hand, the embodiment of the present invention provides a kind of data interactive method based on BS, including:
Client determines incoming rule, and according to described incoming rule determine at least two request datas, by described at least Two request datas merge, and obtain merging data, and described merging data are sent to server, described incoming Rule Expression Order between each request data and relation;
Described server receives merging data, obtains described at least two request datas from described merging data, and right Each request data carries out process and obtains at least two request results, more described at least two request results are merged obtains Feedback data, and send described feedback data to client;
Described client receives the feedback data that described server sends, according to described incoming rule from described feedback data Extract described at least two request results, wherein, request results correspond at least one request data, and display is received At least one request results.
On the other hand, the embodiment of the present invention provides a kind of data interaction system based on BS, including client and server, Including:
Described client is used for determining incoming rule, and determines at least two request datas, institute according to described incoming rule State the order between each request data of incoming Rule Expression and relation, described at least two request datas are merged, and obtains Merging data, described merging data is sent to server;
Described server is used for receiving merging data, obtains described at least two request datas from described merging data, And process is carried out to each request data obtain at least two request results, more described at least two request results are merged Obtain feedback data, and send described feedback data to client;
Described client is additionally operable to receive the feedback data that described server sends, according to described incoming rule from described anti- Feedback data extracts described at least two request results, and wherein, request results correspond at least one request data, show institute At least one request results receiving.
Another further aspect, the embodiment of the present invention provides a kind of client, including:
Acquisition request module, for determining incoming rule, and determines at least two request datas according to described incoming rule, Order between described each request data of incoming Rule Expression and relation;
Merge module, for merging described at least two request datas, and obtain merging data;
Sending module, for sending described merging data to server;
Receiver module, for receiving the feedback data that described server sends, described feedback data is by described server Obtain described at least two request datas from described merging data, and process is carried out to each request data and obtain at least two Request results, more described at least two request results are merged obtain;
Decomposing module, for described at least two request results are extracted from described feedback data according to described incoming rule, Wherein, request results correspond at least one request data;
Display module, for showing at least one received request results.
Another aspect, the embodiment of the present invention provides a kind of server, including a kind of service logic data access manager, institute State service logic data access manager to include:
Receiver module, for receiving the merging data of client transmission;
Requirement analysis module, for obtaining described at least two request datas from described merging data, described at least two Individual request data is to be determined according to incoming rule by described client, between described each request data of incoming Rule Expression Order and relation;
Processing module, obtains at least two request results for carrying out process to each request data;
Request results merge module, for merging described at least two request results, obtain feedback data;
Sending module, for sending described feedback data to described client.
Data interactive method based on BS provided in an embodiment of the present invention and system, client and server, can be in visitor Family end merges multiple request datas, and the request data of merging is sent to server, and server enters to the request data merging Row decomposition obtains the plurality of request data, each request data is processed and is obtained request results, request results are closed And after send so that client obtains the request results of server feedback to client, so that the client in system is only A data interaction need to be carried out with server a plurality of request data can be sent to server, and server also only need to be carried out Once feed back, you can request results are back to client.The scheme that the present invention provides, can need to carry out many secondary data please In the case of asking, the interaction times between client and server in minimizing system, and do not need to increase new data access Interface, it is to avoid increase extra interface to reduce request number of times in prior art, leads to Business Logic complexity to increase Plus problem, thus reducing the complexity of system, improve the reliability of system.And due to avoiding the number increasing interface Amount, thus reducing when application system is run, updated and safeguard, needs time energy and the cost expending.
Brief description
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, below by use required in embodiment Accompanying drawing be briefly described it should be apparent that, drawings in the following description are only some embodiments of the present invention, for ability For the those of ordinary skill of domain, on the premise of not paying creative work, can also be obtained other attached according to these accompanying drawings Figure.
Fig. 1 is a kind of structural representation of system architecture provided in an embodiment of the present invention;
Fig. 2 is a kind of flow chart of data interactive method based on BS provided in an embodiment of the present invention;
Fig. 3 is the flow chart of another kind of data interactive method based on BS provided in an embodiment of the present invention;
Fig. 4 is a kind of a kind of flow process of implementation of data interactive method based on BS provided in an embodiment of the present invention Figure;
Fig. 5 is a kind of structural representation of data interaction system based on BS provided in an embodiment of the present invention;
Fig. 6 is a kind of structural representation of client provided in an embodiment of the present invention;
Fig. 7 is a kind of structural representation of server provided in an embodiment of the present invention;
Fig. 8 is the structural representation of another kind server provided in an embodiment of the present invention;
Fig. 9 is a kind of structural representation of module in a kind of server provided in an embodiment of the present invention;
Figure 10 is a kind of structural representation of unit in a kind of server provided in an embodiment of the present invention.
Specific 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 carried out clear, complete Site preparation description is it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is all other that those of ordinary skill in the art are obtained under the premise of not making creative work Embodiment, broadly falls into the scope of protection of the invention.
Technical scheme provided in an embodiment of the present invention can apply to the system of the WEB framework based on BS, as shown in figure 1, Client and server wherein can be included.Client can be the terminal units such as mobile phone, PC and PAD.Permissible in the client Including merging request manager, at least two request datas can be merged into a merging by the merging request manager of client Data, and send to server;The feedback data that client can be sended over the reception server, and decomposition is obtained at least Two request results, request results are that a request data obtains on the server after treatment.Server is permissible Including service logic data access manager, the merging data that the service logic data management system of server sends to client enters Row decomposition obtains each request data, and each request data is processed, and obtains the request results of each request data, Again at least two request results are merged into feedback data, and send to client.
Embodiments provide a kind of data interactive method based on BS, the method can be used for the base shown in Fig. 1 WEB architecture system in BS.As shown in Fig. 2 the method can include:
201, client determines incoming rule, and determines at least two request datas according to described incoming rule.
Wherein, the order between each request data of incoming Rule Expression and relation.Specifically, incoming rule can be wrapped Include:The output result of request data above serves as the parameter in request data processing procedure below, works in coordination with number of request below According to its output result of generation.For example:The process of request data 2 depends on request data 1, and request data 2 is located at number of request After 1, then server when processing request data 2, need using the output result that obtains of pre-treatment request data 1 as please Seek the parameter of data 2, just can correctly produce the output result of request data 2.Such as:In a Students'Management System, need Student information to be inquired about, and the request results that the request inquiring about student information is inquired about based on class, now, the request of class's inquiry Result is exactly the parameter in the request processing procedure inquire about student information.
Wherein, can be cascaded in the way of using array between each request data, each of array item is right The call back function of a request data that should be related, call back function is used for call request data.Request data comprises the ground asked The parameter list of location, the identification number of request and request.For example, two request datas are request data 1 and request data 2, two request datas are connected using array mode, obtains array a, then array a includes two items, be a [1] and a respectively [2], a [1] corresponding be request data 1 call back function, it to be the call back function of request data 2 that a [2] is corresponding.
202, described at least two request datas are merged by described client, and obtain merging data.
Wherein, at least two request datas are merged by client according to certain order, obtain merging data, meanwhile, record Order and relation that at least two request datas merge.
203, described merging data is sent by described client to server.
Wherein, merging data sends to server needs through data-interface, and data-interface can be that simple transmission is led to Road, merging data and common single request data can be identical by way of data-interface, therefore do not need modification or Change the framework of original application system, reduce the complexity of application system.
Optionally, merging data can also include identification information, and identification information is used for representing that merging data is by least two Individual request data merging obtains.Merging data can be separated with single request data field by client by identification marking information Come it is ensured that more efficient the carrying out of the processing procedure in later stage.For example:Function 1 needs request data 1 and request data 2 to support to complete, Function 2 only needs to request data 3 and supports to complete.When request data 1 and request data 2-in-1 and for merging data when, can for close And data specifies an identification information, this identification information allows merging data and request data 3 to make a distinction.
204, described server receives merging data.
205, described server obtains described at least two request datas from described merging data.
Wherein, server can decompose and obtain according to client in 202 inverse process obtaining merging data from merging data Take at least two request datas.
206, described server carries out process to each request data and obtains at least two request results.
Wherein, server can record required parameter and request address of request data etc., if each request data it Between there is no continuous relationship, then by execution corresponding function business function module read respectively and process each corresponding number of request According to obtaining the request results corresponding with request data.If there is continuous relationship between each request data, such as:Request Data 2 is undertaken in request data 1, and the business function module of execution corresponding function is when processing request data 2 in addition it is also necessary to by other Business function module processes the request results 1 that request data 1 obtains, and just can obtain request results 2, request results 2 can be with table Show request data 1 and request data 2 all through processing.
207, described server merges to described at least two request results and obtains feedback data, and sends described anti- Feedback data is to client.
Wherein, server merges the specific implementation that at least two request results obtain feedback data, can be with client End will be identical or corresponding for the mode of at least two request datas merging 202, and the wherein corresponding server that refers to merges The packaged type of request results can be identical with the packaged type that client merges request data in 202, or client The concrete mode merging request data in 202 is to employ dedicated for the scheme processing request data in existing protocol, and The concrete mode that server merges request results is dedicated for the scheme processing request results in existing protocol.
208, described client receives the feedback data that described server sends.
209, described client extracts described at least two request results according to described incoming rule from described feedback data.
Wherein, request results can correspond at least one request data, and client can be according to server 207 In the inverse process obtaining feedback data is merged to request results, extract at least two request results from feedback data.Tool For body, request results can correspond only to a request data, such as:Certain function of application system needs number of request Support according to 1 and request data 2 just can complete, but does not have continuous relationship between request data 1 and request data 2, then from anti- In feedback data, the request results 1 obtaining, request results 2 are corresponded with request data 1, request data 2 successively.One request knot Fruit may correspond to multiple request datas, such as:Certain function of application system needs request data 1, request data 2 and asks Ask data 3 to support just can complete, and request data 3 is undertaken in request data 1 and request data 2, such as request data 3 Process need request results 1 and request results 2 as parameter, then the request results 3 obtaining from feedback data can also be right Should be in the process of request data 1,2,3.
210, described client shows at least one received request results.
Wherein, after obtaining at least two request results from feedback data, it is corresponding that each request results can return it It is in the interface function module of expression layer, thus the result or data obtaining is shown on the display device at interface.
Data interactive method based on BS provided in an embodiment of the present invention, can merge multiple request datas in client, And the request data of merging is sent to server, meanwhile, client pass through identification marking information can also by merging data with Single request data separation comes it is ensured that the processing procedure in later stage is more efficiently carried out.Server is to the request data merging Carry out decomposition and obtain multiple request datas, each request data is processed and is obtained request results, request results are merged Send to client afterwards, client obtains the request results of server feedback, in this process, each request results with least One request data corresponds to it is ensured that processing the correctness with transmitting procedure.The scheme that the present invention provides, can need to carry out In the case of many secondary data request, reduce the interaction times between client and server, and do not need to increase new data Access interface, it is to avoid increase extra interface to reduce request number of times in prior art, leads to Business Logic complicated The problem that degree increases, thus reducing the complexity of system, improves the reliability of system.And due to avoiding increase interface Quantity, thus reduce application system run, update and safeguard when, need expend time energy and cost.
On the basis of method as shown in Figure 2, the embodiment of the present invention additionally provides a kind of data interaction side based on BS Method, as shown in figure 3, can include:
301, client determines incoming rule, and determines at least two request datas according to described incoming rule.
Wherein, the order between each request data of incoming Rule Expression and relation.
302, described at least two request datas are merged by described client, and obtain merging data.
303, described merging data is sent by described client to server.
304, all request datas that client described in described server intercepts sends.
Wherein, all request datas that client sends can include merging data and single request data.Merging data Identification information can also be included, identification information is used for representing that merging data is obtained by least two request datas merging.This All request datas are intercepted by place, and all request datas are identified, and the request data with identification information as merges number According to;The request data not recognizing identification information is single request data, can be directly transferred to corresponding business function mould Block, and processed according to conventional technological means.
305, described server determines the request data with described identification information from the request data intercepting, and will have The request data having described identification information is as described merging data.
306, described server obtains described at least two request datas from described merging data.
307, described server by utilizing request dynamic proxy, each number of request described is directed to according to described incoming rule According to being processed, and obtain described at least two request results.
Wherein, server set up request dynamic proxy can adapter business function module input.Business function mould Block needs the request data sending by request dynamic proxy come reading client.Wherein, request dynamic proxy Each request data can be read with call parameters manager, request dynamic proxy is according to the function distribution of business function module To the corresponding request data of business function module.Illustrate, business function module 1 needs to receive request data 1 to carry out Process, business function module 2 needs reception request data 2 to be processed, and request dynamic proxy is managed by call parameters Request data 1 is distributed to business function module 1 by request dynamic proxy and is entered by device read requests data 1 and request data 2 Row is processed, and request data 2 is distributed to business function module 2 and is processed.
Server can also set up response dynamic proxy, by response dynamic proxy adapter business function module Output.For example:Business function module completes to process and obtain after request results at least two request datas, and correspondence is obtained Request results export in response dynamic proxy.
308, described server merges to described at least two request results and obtains feedback data, and sends described anti- Feedback data is to client.
Wherein, the specific embodiment merging request results can be identical with 207, and here is omitted.
309, described client receives the feedback data that described server sends.
310, described client extracts described at least two request results according to described incoming rule from described feedback data.
311, described client shows at least one received request results.
Data interactive method based on BS provided in an embodiment of the present invention, can merge multiple request datas in client, And send the request data of merging to server, server can intercept all request datas of client transmission, and passes through Identification information identify merging data, to merging data, the mode different with single request data application is processed, from without Modification or the framework changing application system;Server uses request dynamic proxy and response dynamic proxy adapter business The input of functional module and output, dynamic proxy can be with call parameters manager, and it is right to distribute to each request data The business function module answered.The scheme that the present invention provides, can reduce client in the case of needing to carry out many secondary data request Interaction times between end and server, and do not need to increase new data access interface, it is to avoid in prior art in order to Reducing request number of times and increase extra interface, leading to the problem that Business Logic complexity increases, thus reducing system Complexity, improves the reliability of system.And due to avoiding the quantity increasing interface, thus reduce in application system fortune When going, updating and safeguard, need time energy and the cost expending.
For example, as shown in figure 4,307 specific implementation can include:
3071, according to described incoming rule, in each request data described, determine the first request data.
Wherein, each request data includes the first request data to N request data, and N is the integer more than or equal to 2, the There is continuous relationship in one request data to N request data, and the request data above for request data undertaking below, For example:Second request data is undertaken in the first request data, and the request results of the first request data are served as and obtained the second request knot The parameter of fruit.
3072, using described request dynamic proxy call parameters manager, described first request data is processed, And obtain the first request results, and described first request results are stored in described parameter manager.
3073, call described parameter manager according to described first request results pair using described request dynamic proxy Second request data is processed, and obtains the second request results, and described second request results are stored in described parametron In reason device.
In the present embodiment, server can repeat 3071- using described request dynamic proxy call parameters manager 3073 embodiment, is processed to each request data successively, until obtain N request results, and for one During individual request data is processed, obtain at least one from described parameter manager and process other request datas and obtain Request results, and by described at least one process the request results that other request datas obtain, as participate in this request The parameter of data processing.For example, request data 3 is undertaken in request data 1 and request data 2, request data 1 corresponding requests result 1, request data 2 corresponding requests result 2, request data 3 corresponding requests result 3.When so processing request data 3, need to utilize Request results 1 in request dynamic proxy call parameters manager and request results 2, by request results 1, request results 2 and Request data 3 proceeds to business function module and is processed, and obtains request results 3, request results 3 is exported dynamic to response Agency, parameter manager reads the request results 3 in response dynamic proxy, and stores.Such as:In a student-directed system In system, need to inquire about student information, and the request inquiring about student information is based on grade's inquiry request result and class's inquiry request Result.When inquiring about student information, request dynamic proxy can call the grade's inquiry request knot being buffered in parameter manager Fruit and class's inquiry request result, student information inquiry request, grade's inquiry request result and class's inquiry request result are turned Enter business function module to be processed, obtain inquiring about the request results of student information, will be defeated for the request results of inquiry student information Go out to response dynamic proxy, parameter manager can read the request knot of the inquiry student information in response dynamic proxy Really, and store.
Data interactive method based on BS provided in an embodiment of the present invention, for having the request data of continuous relationship, profit With the request data in request dynamic proxy call parameters manager and request results, parameter manager reading response Request results in dynamic proxy, have taken over input and the output of business function module in a dynamic way.The present invention provides Scheme, can reduce the interaction times between client and server in the case of needing to carry out many secondary data request, and Do not need to increase new data access interface, it is to avoid in prior art, increase extra interface to reduce request number of times, The problem leading to Business Logic complexity to increase, thus reducing the complexity of system, improves the reliability of system.And Due to avoiding the quantity increasing interface, thus reducing when application system is run, updated and safeguard, need the time expended Energy and cost.
The embodiment of the present invention additionally provides a kind of data interaction system 500 based on BS, as shown in figure 5, including:
Client 501, for determining incoming rule, and determines at least two request datas, institute according to described incoming rule State the order between each request data of incoming Rule Expression and relation, described at least two request datas are merged, and obtains Merging data, described merging data is sent to server.
Server 502, for receiving merging data, obtains described at least two request datas from described merging data, And process is carried out to each request data obtain at least two request results, more described at least two request results are merged Obtain feedback data, and send described feedback data to client.
Described client 501, is additionally operable to receive the feedback data that described server sends, according to described incoming rule from institute State feedback data and extract described at least two request results, wherein, request results correspond at least one request data, show Show at least one received request results.
Data interaction system based on BS provided in an embodiment of the present invention, can merge multiple request datas in client, And send the request data of merging to server, server carries out decomposition to the request data merging and obtains the plurality of request Data, is processed to each request data and is obtained request results, after request results are merged to client send so that visitor Family end obtains the request results of server feedback, so that the client in system only need to carry out a secondary data friendship with server Mutually a plurality of request data can be sent to server, and server also only need to once be fed back, you can by request results It is back to client.The scheme that the present invention provides, can be in the case of needing to carry out many secondary data request, visitor in minimizing system Interaction times between family end and server, and do not need to increase new data access interface, it is to avoid in prior art be Reduce request number of times and increase extra interface, lead to the problem that Business Logic complexity increases, thus reduce system Complexity, improve the reliability of system.And due to avoiding the quantity increasing interface, thus reducing in application system When running, updating and safeguard, need time energy and the cost expending.
The embodiment of the present invention additionally provides a kind of client 600, as shown in fig. 6, including:
Acquisition request module 601, for determining incoming rule, and determines at least two number of requests according to described incoming rule According to, the order between described each request data of incoming Rule Expression and relation.
Merge module 602, for merging described at least two request datas, and obtain merging data.
Wherein, merge module and be additionally operable to add identification information in merging data, identification information is used for representing merging data Merged by least two request datas and obtain.
Sending module 603, for sending described merging data to server.
Receiver module 604, for receiving the feedback data that described server sends.
Wherein, described feedback data is to obtain described at least two number of requests from described merging data by described server According to, and process is carried out to each request data obtain at least two request results, more described at least two request results are carried out Merging obtains.
Decomposing module 605, for extracting described at least two request knots according to described incoming rule from described feedback data Really.
Wherein, request results correspond at least one request data.
Display module 606, for showing at least one received request results.
Client provided in an embodiment of the present invention, can merge multiple request datas, and the request that will merge in client Data is activation to server, make client only need to server carry out a data interaction can by a plurality of request data send to Server, client merging data and single request data separation can be come by identification marking information it is ensured that the later stage Processing procedure is more efficiently carried out, after the feedback data of client the reception server transmission, can be according to incoming rule from anti- Feedback extracting data go out at least two request results, each request results corresponding with least one request data it is ensured that locate Reason and the correctness of transmitting procedure.The scheme that the present invention provides, can reduce in the case of needing to carry out many secondary data request Interaction times between client and server, and do not need to increase new data access interface, it is to avoid in prior art Increasing extra interface to reduce request number of times, leading to the problem that Business Logic complexity increases, thus reduce being The complexity of system, improves the reliability of system.And due to avoiding the quantity increasing interface, thus reduce in application system When system runs, updates and safeguard, need time energy and the cost expending.
The embodiment of the present invention additionally provides a kind of server 700, and it includes a kind of service logic data access manager 701, as shown in fig. 7, described service logic data access manager 701 includes:
Receiver module 702, for receiving the merging data of client transmission.
Wherein, merging data also includes identification information, and identification information is used for representing that merging data is by least two requests Data merging obtains.
Requirement analysis module 703, for obtaining described at least two request datas from described merging data, described at least Two request datas are to be determined according to incoming rule by described client, between described each request data of incoming Rule Expression Order and relation.
Processing module 704, obtains at least two request results for carrying out process to each request data.
Request results merge module 705, for merging described at least two request results, obtain feedback data.
Sending module 706, for sending described feedback data to described client.
Server provided in an embodiment of the present invention, can merge multiple request datas, and the request that will merge in client To server, server carries out decomposition to the request data merging and obtains multiple request datas, to each number of request data is activation According to being processed and being obtained request results, request results are merged backward according to the order that request data merging obtains merging data Client sends so that client obtains the request results of server feedback it is ensured that the correctness of application system feature operation. The scheme that the present invention provides, can reduce between client and server in the case of needing to carry out many secondary data request Interaction times, and do not need to increase new data access interface, it is to avoid increase to reduce request number of times in prior art Plus extra interface, the problem leading to Business Logic complexity to increase, thus reducing the complexity of system, improve system Reliability.And due to avoiding the quantity increasing interface, thus reducing when application system is run, updated and safeguard, Need time energy and the cost expending.
On the basis of server as shown in Figure 7, as shown in figure 8, described service logic data access manager 701 is also Can include:
Blocking module 707, for intercepting all request datas that described client sends.
Identification module 708, for determining the request data with described identification information from the request data intercepting, and will The request data with described identification information is as described merging data.
For example, as shown in figure 9, described processing module 704 can include:
Agent unit 7041, for using request dynamic proxy, according to described incoming rule for each request described Data is processed, and obtains described at least two request results.
Specifically, described server also includes a kind of parameter manager, and each request data described includes the first request To N request data, N is the integer more than or equal to 2 to data, and as shown in Figure 10, described agent unit 7041 includes:
Promoter unit 70411, for according to described incoming rule, determining the first request in each request data described Data.
Process subelement 70412, for asking to described first using described request dynamic proxy call parameters manager Ask data to be processed, and obtain the first request results, and described first request results are stored in described parameter manager.
Wherein, process subelement 70412, be additionally operable to using request dynamic proxy call parameters manager according to first Request results are processed to the second request data, and obtain the second request results, and the second request results are stored in parameter In manager.
Wherein, process subelement 70412, be additionally operable to repeat said process, using request dynamic proxy call parameters pipe Reason device carries out to each request data processing until obtaining N request results successively, and is entering for a request data During row is processed, obtain at least one from parameter manager and process the request results that other request datas obtain, and will At least one processes the request results that other request datas obtain as participating in the parameter that this request data is processed.
Server provided in an embodiment of the present invention, can merge multiple request datas, and the request that will merge in client To server, server can intercept all request datas of client transmission to data is activation, and identifies conjunction by identification information And data, to merging data, the mode different with single request data application is processed it is not necessary to being changed or changing application system Framework.With input and the output of request dynamic proxy and response dynamic proxy adapter business function module, dynamically Each request data can also be distributed to corresponding business function module with call parameters manager by agency.The present invention carries For scheme, the interaction times between client and server can be reduced in the case of needing to carry out many secondary data request, And do not need to increase new data access interface, it is to avoid increase extra connecing to reduce request number of times in prior art Mouthful, the problem leading to Business Logic complexity to increase, thus reducing the complexity of system, improve the reliability of system. And due to avoiding the quantity increasing interface, thus reducing when application system is run, updated and safeguard, need consuming Time energy and cost.
Each embodiment in this specification is all described by the way of going forward one by one, identical similar portion between each embodiment Divide mutually referring to what each embodiment stressed is the difference with other embodiment.Real especially for equipment For applying example, because it is substantially similar to embodiment of the method, so describing fairly simple, referring to embodiment of the method in place of correlation Part illustrate.
One of ordinary skill in the art will appreciate that realizing all or part of flow process in above-described embodiment method, it is permissible Instruct related hardware to complete by computer program, described program can be stored in a computer read/write memory medium In, this program is upon execution, it may include as the flow process of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic Dish, CD, read-only memory(Read-Only Memory, ROM)Or random access memory(Random Access Memory, RAM)Deng.
The above, the only specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, and any Those familiar with the art the invention discloses technical scope in, the change or replacement that can readily occur in, all answer It is included within the scope of the present invention.Therefore, protection scope of the present invention should be defined by scope of the claims.

Claims (12)

1. a kind of data interactive method based on BS is it is characterised in that include:
Client determines incoming rule, and determines at least two request datas according to described incoming rule, by described at least two Request data merges, and obtains merging data, and described merging data is sent to server, described incoming Rule Expression each Order between request data and relation, wherein, described incoming rule includes, and serves as rear in the output result of front request data Parameter in request data processing procedure, work in coordination with described in rear request data produce output result;
Described server receives merging data, obtains described at least two request datas from described merging data, and to each Request data carries out process and obtains at least two request results, more described at least two request results are merged is fed back Data, and send described feedback data to client;
Described client receives the feedback data that described server sends, and is extracted from described feedback data according to described incoming rule Described at least two request results, wherein, request results correspond at least one request data, received by display extremely Few request results.
2. the data interactive method based on BS according to claim 1 is it is characterised in that described merging data also includes marking Knowledge information, described identification information is used for representing that described merging data is obtained by least two request datas merging.
3. the data interactive method based on BS according to claim 1 and 2 is it is characterised in that described server receives visitor The merging data that family end sends includes:
Intercept all request datas that described client sends;
Determine the request data with identification information from the request data intercepting, and will there is the number of request of described identification information According to as described merging data.
4. the data interactive method based on BS according to claim 1 and 2 it is characterised in that described to each number of request According to carrying out process and obtain at least two request results including:
Using request dynamic proxy, processed for each request data described according to described incoming rule, and obtained institute State at least two request results.
5. the data interactive method based on BS according to claim 4 is it is characterised in that each request data described includes To N request data, N is the integer more than or equal to 2 to first request data, according to described incoming rule for each request described Data carries out processing inclusion:
Step S1, according to described incoming rule, determines the first request data in each request data described;
Step S2, is processed to described first request data using described request dynamic proxy call parameters manager, and Obtain the first request results, and described first request results are stored in described parameter manager;
Step S3, calls described parameter manager according to described first request results to using described request dynamic proxy Two request datas are processed, and obtain the second request results, and described second request results are stored in described parameter management In device;
Repeat the above steps S1 to step S3, using described request dynamic proxy call parameters manager successively to each Request data carries out processing until obtaining N request results, and during a request data is processed, from Obtain at least one in described parameter manager and process the request results that other request datas obtain, and by described at least one Manage the request results that other request datas obtain as participating in the parameter that this request data is processed.
6. a kind of data interaction system based on BS, including client and server it is characterised in that including:
Described client is used for determining incoming rule, and determines at least two request datas, described biography according to described incoming rule Enter the order between each request data of Rule Expression and relation, described at least two request datas are merged, and is merged Data, described merging data is sent to server, and wherein, described incoming rule is included, in the output result of front request data Serve as the parameter in rear request data processing procedure, work in coordination with described in rear request data produce output result;
Described server is used for receiving merging data, obtains described at least two request datas from described merging data, and right Each request data carries out process and obtains at least two request results, more described at least two request results are merged obtains Feedback data, and send described feedback data to client;
Described client is additionally operable to receive the feedback data that described server sends, according to described incoming rule from described feedback coefficient According to extracting described at least two request results, wherein, request results correspond at least one request data, and display is received At least one request results arriving.
7. a kind of client is it is characterised in that include:
Acquisition request module, for determining incoming rule, and determines at least two request datas according to described incoming rule, described Order between each request data of incoming Rule Expression and relation, wherein, described incoming rule is included, in front request data Output result serves as the parameter in rear request data processing procedure, work in coordination with described in rear request data produce output result;
Merge module, for merging described at least two request datas, and obtain merging data;
Sending module, for sending described merging data to server;
Receiver module, for receiving the feedback data that described server sends, described feedback data is from institute by described server State and in merging data, obtain described at least two request datas, and process is carried out to each request data and obtain at least two requests As a result, then to described at least two request results merge and to obtain;
Decomposing module, for described at least two request results are extracted from described feedback data according to described incoming rule, wherein, One request results corresponds at least one request data;
Display module, for showing at least one received request results.
8. client according to claim 7, it is characterised in that described merging module, is additionally operable in described merging data Middle interpolation identification information, described identification information is used for representing that described merging data is to be merged by least two request datas to obtain 's.
9. a kind of server it is characterised in that including a kind of service logic data access manager, visit by described service logic data Ask that manager includes:
Receiver module, for receiving the merging data of client transmission;
Requirement analysis module, for obtaining at least two request datas, described at least two number of requests from described merging data According to being to be determined according to incoming rule by described client, the order between described each request data of incoming Rule Expression and pass System, wherein, described incoming rule includes, and serves as the ginseng in rear request data processing procedure in the output result of front request data Number, work in coordination with described in rear request data produce output result;
Processing module, obtains at least two request results for carrying out process to each request data;
Request results merge module, for merging described at least two request results, obtain feedback data;
Sending module, for sending described feedback data to described client.
10. server according to claim 9 is it is characterised in that described merging data also includes identification information, described mark Knowledge information is used for representing that described merging data is obtained by least two request datas merging;
Described service logic data access manager also includes:
Blocking module, for intercepting all request datas that described client sends;
Identification module, for determining the request data with described identification information from the request data intercepting, and will have institute The request data stating identification information is as described merging data.
11. servers according to claim 10 are it is characterised in that described processing module includes:
Agent unit, for using request dynamic proxy, carrying out for each request data described according to described incoming rule Process, and obtain described at least two request results.
12. servers according to claim 11 it is characterised in that described server also includes a kind of parameter manager, Each request data described includes the first request data to N request data, and N is the integer more than or equal to 2, described agent unit Including:
Promoter unit, for according to described incoming rule, determining the first request data in each request data described;
Process subelement, for entering to described first request data using described request dynamic proxy call parameters manager Row is processed, and obtains the first request results, and described first request results are stored in described parameter manager;
Described process subelement, is additionally operable to call described parameter manager according to described using described request dynamic proxy One request results are processed to the second request data, and obtain the second request results, and described second request results are stored In described parameter manager;
Described process subelement, is additionally operable to control described promoter unit and described process subelement to repeat described promoter respectively Unit and the running of described process subelement, using described request dynamic proxy call parameters manager successively to every One request data carries out processing until obtaining N request results, and in the process being processed for a request data In, obtain at least one from described parameter manager and process the request results that other request datas obtain, and by described at least One processes the request results that other request datas obtain as participating in the parameter that this request data is processed.
CN201310313956.2A 2013-07-24 2013-07-24 Data interactive method based on BS and system, client and server Active CN103401909B (en)

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 CN103401909A (en) 2013-11-20
CN103401909B true 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)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
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
CN106657193B (en) * 2015-11-02 2019-11-19 腾讯科技(深圳)有限公司 A kind of request processing method, device, terminal device and server
KR102641971B1 (en) * 2016-03-17 2024-02-29 구글 엘엘씨 Hybrid client-server data provision
CN106790444A (en) * 2016-12-06 2017-05-31 腾讯科技(深圳)有限公司 Network data exchange method and device
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
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

Citations (5)

* Cited by examiner, † Cited by third party
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
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

Also Published As

Publication number Publication date
CN103401909A (en) 2013-11-20

Similar Documents

Publication Publication Date Title
CN103401909B (en) Data interactive method based on BS and system, client and server
CN104115142B (en) For the file specific to equipment of bookmark synchronization
CN101808051B (en) Application integration gateway and control method thereof
CN103051551A (en) Distributed system and automatic maintaining method for same
CN108255614A (en) A kind of interface calling system and method based on micro services framework
CN108804514A (en) A kind of webpage loading method, server and webpage loading system
CN103139157A (en) Network communication method based on socket, device and system
CN103036977A (en) Business pushing method and pushing system based on content distribution network
CN101499995A (en) Service scheduling method, system and apparatus for service scheduling
CN103793485A (en) Method for inquiring network data by client terminal based on cached data
CN103596066A (en) Method and device for data processing
CN105656924A (en) Data processing method, device and system
CN105183299A (en) Human-computer interface service processing system and method
CN106713391A (en) Session information sharing method and sharing system
CN108124007A (en) The method and apparatus of message data real-time Transmission
CN109144619A (en) Icon font information processing method, apparatus and system
CN104008055B (en) The method of software test, equipment and system
CN106713684A (en) Method and equipment for binding unified communication client account number with phone number
CN104243360B (en) The collocation method and device of a kind of conversion link
CN107347202A (en) The initial access method and device that a kind of terminal is cut into slices under framework in network
CN112351106B (en) Service grid platform containing event grid and communication method thereof
CN103001967A (en) Source station server and business push method
CN108345508A (en) Interface calls test method and device
CN106657350A (en) Data replication method and device
CN104601595B (en) Publication, access method and the system of webpage

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