CN103297474B - A kind of batch processing subpackage method and system - Google Patents
A kind of batch processing subpackage method and system Download PDFInfo
- Publication number
- CN103297474B CN103297474B CN201210052072.1A CN201210052072A CN103297474B CN 103297474 B CN103297474 B CN 103297474B CN 201210052072 A CN201210052072 A CN 201210052072A CN 103297474 B CN103297474 B CN 103297474B
- Authority
- CN
- China
- Prior art keywords
- bag
- processing
- server
- terminal
- request
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Abstract
The invention discloses a kind of batch processing subpackage method, including:The ID respectively asked in the batch request bag sent according to terminal obtains corresponding server-side address;All requests of corresponding same services end address are encapsulated in a protocol package, and protocol package is sent to corresponding server-side according to corresponding server-side address;The invention also discloses a kind of batch processing subpackage system, can be realized under the scene of mass data by the method for the present invention, and server-side responds the high efficiency of request of data.
Description
Technical field
The present invention relates to mass data storage and network communication technology, particularly relates to a kind of batch processing subpackage method and is
System.
Background technology
User's original content (UGC, User Generated Content or User Created Content) is a kind of
User uses the new paragon of internet, i.e., becomes to download based on download and upload is laid equal stress on by original.Community network, video point
Enjoy and blog etc. be all UGC main application form, with the variation of intelligent terminal, the continuous hair of global interconnection network service
Exhibition, UGC business increasingly emerge, and cause the extensive concern of industry.
Micro-group is that a kind of new UGC business forms for being derived, micro-group can polymerize with developing rapidly for microblogging
There is the user of identical hobby or same label, all corresponding topics are all gathered in micro-group, allows and has similar tastes and interests
User's participation more convenient in the form of microblogging with exchange.
In micro-group, since data are that user produces, the user of magnanimity expedites the emergence of out mass data, finally brings a greater amount of
The read request of the data of level.Under such a scene, how server-side improves the response speed of read request, to complete to service as early as possible,
As a urgent problem to be solved.Wherein, the server-side refers to the process that service response is provided for terminal.
To solve the above-mentioned problems, the prior art proposes a kind of asynchronous subpackage scheme, as shown in Figure 1, the program is big
Causing thinking is:In the batch request bag that logical layer parsing user sends, a request is often parsed, will request composition one
New protocol package, and according to corresponding micro-group ID (GUIN:Group User Identification Number, it is also referred to as micro-
Group account) belonging to number section, be sent to the corresponding service processes of lower floor (i.e. server-side) handle.Wherein, the number section is one
Continuous ID scopes, are the base units of deployment or migration.As 50,000 continuous ID become a deployment number section.
Such scheme is of problems to be:
1st, network I/O interaction is more., only please comprising one in a protocol package when logical layer is to service processes distribution request bag
Ask, bring the increase of network I/O.And in mass data processing, network I/O tends to the bottle as whole system performance
Neck.
2nd, service processes protocol section number of processes is more.In service processes aspect, each request can bring an agreement
Processing, in mass data processing, service processes carry out protocol processes number increase, can also seriously affect system performance.
The above problem directly influences the speed of response, therefore, under the scene of mass data, it is still desirable to a kind of effective
Method improve the response speed to request of data.
The content of the invention
In view of this, it is a primary object of the present invention to provide a kind of batch processing subpackage method and system, to solve
Under the scene of mass data, the problem of how server-side improves the response speed to request of data.
To reach above-mentioned purpose, the technical proposal of the invention is realized in this way:
The present invention provides a kind of batch processing subpackage method, this method includes:
The ID respectively asked in the batch request bag sent according to terminal obtains corresponding server-side address;
All requests of corresponding same services end address are encapsulated in a protocol package, and according to corresponding server-side
The protocol package is sent to corresponding server-side by location.
Wherein, after protocol package being sent to corresponding server-side, this method further includes:Receive place of each server-side to request
Manage back bag.
The processing that each server-side is received to request returns bag and is:
One asynchronous session of memory (session) A, is set, records the terminal and receives the ability for handling back bag, and receive
Bag is returned in processing of each server-side to request;
B, the asynchronous session of the memory judges that the current processing received returns whether bag meets that the terminal reception is handled back
The ability of bag;If it is satisfied, it is transferred to C;If conditions are not met, it is transferred to D;
C, bag is returned into the processing received and returns to the terminal, stop receiving processing time bag of each server-side to request;
D, continue to processing of each server-side to request and return bag, return to B.
Bag is returned into the processing received and returns to the terminal, is:The processing received is returned into encapsulation in an agreement
Bao Zhong, returns to the terminal.
The terminal receives the ability for handling back and wrapping:What the terminal can receive handles back the size of bag;
What the judgement had currently received handles back whether bag meets that the terminal receives the ability for handling back bag, is:Sentence
Whether the disconnected current size for handling back bag received reaches the size for handling back bag that the terminal can receive, if reached
Arrive, be then judged to meeting;Otherwise, it is determined that to be unsatisfactory for.
Present invention also offers a kind of batch processing subpackage system, which includes:Terminal, logic module and one or
Multiple server-sides;Wherein:
The terminal, for sending batch request bag;
The logic module, for receiving the batch request bag, and according to the ID respectively asked in the batch request bag
Obtain corresponding server-side address;All requests of corresponding same services end address are encapsulated in a protocol package, and foundation
The protocol package is sent to corresponding server-side by corresponding server-side address;
The server-side, for receiving the corresponding protocol package.
Wherein, the logic module is additionally operable to receive processing time bag of each server-side to request.
The logic module, is additionally operable to:
One asynchronous session of memory (session) A, is set, records the terminal and receives the ability for handling back bag, and pass through
The asynchronous session of memory receives processing of each server-side to request and returns bag;
B, judge that the current processing received returns whether bag meets the terminal receiving area by the asynchronous session of the memory
Manage back the ability of bag;If it is satisfied, it is transferred to C;If conditions are not met, it is transferred to D;
C, the processing received is returned by bag by the asynchronous session of the memory and returns to the terminal, and stop receiving each
Bag is returned in processing of the server-side to request;
D, processing of each server-side to request is continued to by the asynchronous session of the memory and returns bag, return to B.
The logic module, is additionally operable to that the processing received is returned encapsulation in an association by the asynchronous session of the memory
In view bag, the terminal is returned to.
The logic module, is additionally operable to judge the current size for handling back bag received by the asynchronous session of the memory
The size for handling back bag that the terminal can receive whether is reached, if reached, is judged to meeting that terminal reception is handled
Return the ability of bag;Otherwise, it is determined that receive the ability for handling back and wrapping to be unsatisfactory for terminal.
Batch processing subpackage method and system of the present invention, under the scene of mass data, by the institute of a corresponding server-side
There is request to be encapsulated in a protocol package to be transmitted, this mode greatly reduces the quantity of protocol package, so as to reduce net
The number and server-side of network IO interactions carry out the number of protocol processes, the overall performance of system are improved, so as to solve due to net
The problem of network IO interaction times are more, the often caused response speed of server-side progress protocol processes is slow.
Brief description of the drawings
Fig. 1 is the asynchronous subpackage scheme schematic diagram of the prior art;
Fig. 2 is the method flow diagram of the batch processing subpackage of one embodiment of the invention;
Fig. 3 is the schematic diagram of batch processing subpackage scheme of the present invention;
Fig. 4 is the method flow diagram of the batch processing subpackage of another embodiment of the present invention;
Fig. 5 is that packet procedures schematic diagram is returned in the processing asked in the embodiment of the present invention;
Fig. 6 is the system structure diagram of batch processing subpackage of the present invention.
Embodiment
The scheme of batch processing subpackage of the present invention, by the way that all requests disposably are distributed to corresponding with service end, to realize
The response service of the read request of efficient mass data.Specifically, the as shown in Fig. 2, side of the batch processing subpackage of the present invention
Method includes:
Step 201, the ID respectively asked in the batch request bag sent according to terminal obtains corresponding server-side address.
Step 202, all requests of corresponding same services end address are encapsulated in a protocol package, and according to corresponding
Protocol package is sent to corresponding server-side by server-side address.
Under the scene of mass data, all requests of a corresponding server-side are encapsulated in a protocol package and are sent out
The mode sent, greatly reduces the quantity of protocol package, so as to reduce at the number and server-side progress agreement of network I/O interaction
The number of reason, improves the overall performance of system, so as to lay a good foundation for the response service of efficient request.
It is as shown in Figure 3 based on above-mentioned method, the schematic diagram of the batch processing subpackage by taking micro-group as an example:User passes through terminal
Batch request bag is sent to logical layer, in the embodiment, the ID respectively asked in batch request bag is micro-group ID (GUIN:Group
User Identification Number, also referred to as micro-group account), it is assumed that wherein micro-group ID has:GUIN1、GUIN2、
GUIN3, GUN4, GUIN5 and GUIN6.
Logical layer pulls GUIN and the mapping table of server-side address by configuration center, and therefrom finding out the batch please
Ask the corresponding server-side address of each GUIN in bag, it is assumed that GUIN1 and GUIN2 corresponding with service end address 1, GUIN3 and GUIN4 are corresponded to
Server-side address 2, GUIN5 and GUIN6 corresponding with service end address 3.
GUIN1 and GUIN2 composition protocol packages 1 are sent to the server-side 1 of corresponding with service end address 1 by logical layer;By GUIN3
The server-side 2 of corresponding with service end address 2 is sent to GUIN4 composition protocol packages 2;GUIN5 and GUIN6 composition protocol packages 3 are sent out
It is sent to the server-side 3 of corresponding with service end address 3.
Assuming that GUIN1 and GUIN5 corresponding with service end address 1, GUIN2 and GUIN3 corresponding with service end address 2, GUIN4 and
GUIN6 corresponding with service end address 3.Then GUIN1 and GUIN5 composition protocol packages 1 are sent to corresponding with service end address 1 by logical layer
Server-side 1;GUIN2 and GUIN3 composition protocol packages 2 are sent to the server-side 2 of corresponding with service end address 2;By GUIN4 and
GUIN6 composition protocol packages 3 are sent to the server-side 3 of corresponding with service end address 3.
After protocol package is sent to corresponding server-side, as shown in figure 4, the batch processing subpackage method of the present invention is also wrapped
Include:
Step 203, receive processing of each server-side to request and return bag.
Specifically, the realization of the step as shown in figure 5, including:
One asynchronous session of memory (session) step A, is set, and record terminal receives the ability for handling back bag, and receives
Bag is returned in processing of each server-side to request.
What step B, the asynchronous session of memory judged currently to have received handles back whether bag meets that terminal reception handles back bag
Ability;If it is satisfied, it is transferred to step C;If conditions are not met, it is transferred to step D.
It is preferred that it can be the size for handling back bag that terminal can receive that terminal, which receives the ability for handling back and wrapping,;Then, sentence
Whether the disconnected current size for handling back bag received reaches the size for handling back bag that terminal can receive, if reached,
Then it is judged to meeting that terminal receives the ability for handling back bag;Otherwise, it is determined that receive the ability for handling back and wrapping to be unsatisfactory for terminal.
Wherein, terminal receives the ability for handling back and wrapping and is determined by the hardware and residing network environment of terminal.
Step C, the processing received is returned bag and returns to terminal by the asynchronous session of memory, stops receiving each server-side to request
Processing return bag.
Specifically, the processing received is returned encapsulation in a protocol package by the asynchronous session of memory, the terminal is returned to
.
It is pointed out that it is current received when handle back bag and meeting that terminal receives the ability for handle back and wrapping, regardless of ought
Whether to the processing all asked return bag with the preceding bag that handles back received if being each server-side, all stop receiving and handle back bag, ought
The preceding processing received returns bag and returns to terminal, it is not necessary to waits the processing of all requests to return bag, so as to improve response
Speed;If the current bag that handle back received is not that each server-side wraps the processing time all asked, then for not receiving
To the request for handling back bag, terminal can be initiated again.
Step D, the asynchronous session of memory continues to processing of each server-side to request and returns bag, returns to B.
The flow is directed to time packet procedures of a terminal, and when there is multiple terminals, the asynchronous conversation recording of memory is multiple
The reception of terminal handles back the ability of bag, carries out the processing of step B to step D for each terminal respectively.
It is pointed out that the above method of the present invention is not limited in the response to the read request of data, also not only limit
In the application scenarios of micro-group, the responding scene of any batch request all uses.
In order to realize the above method, present invention also offers a kind of batch processing subpackage system, as shown in fig. 6, the system
Including:Terminal 10, logic module 20 and one or more server-sides 30;Wherein:
Terminal 10, for sending batch request bag;
Logic module 20, for receiving batch request bag, and it is corresponding according to the ID acquisitions respectively asked in batch request bag
Server-side address;All requests of corresponding same services end address are encapsulated in a protocol package, and according to corresponding service
Protocol package is sent to corresponding server-side 30 by end address;
Server-side 30, for receiving corresponding protocol package.
Logic module 20 is additionally operable to receive processing time bag of each server-side to request.
Further, logic module 20, are additionally operable to:
One asynchronous session of memory (session) A, is set, record terminal 10 receives the ability for handling back bag, and by interior
Deposit asynchronous session and receive processing time bag of each server-side 30 to request;
B, judge that the current processing received returns whether bag meets that the reception of terminal 10 handles back bag by the asynchronous session of memory
Ability;If it is satisfied, it is transferred to C;If conditions are not met, it is transferred to D;
C, the processing received is returned by bag by the asynchronous session of memory and returns to terminal 10, and stop receiving each server-side
Bag is returned in the processing of 30 pairs of requests;
D, processing of each server-side 30 to request is continued to by the asynchronous session of memory and returns bag, return to B.
Logic module 20, is additionally operable to that the processing received is returned encapsulation in a protocol package by the asynchronous session of memory
In, return to terminal 10.
Logic module 20, is additionally operable to judge whether the current size for handling back bag received arrives by the asynchronous session of memory
The size for handling back bag that terminal 10 can receive has been reached, if reached, has been determined as that meeting that terminal 10 receives handles back bag
Ability;Otherwise, it is determined that receive the ability for handling back and wrapping to be unsatisfactory for terminal 10.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the scope of the present invention.
Claims (6)
- A kind of 1. batch processing subpackage method, it is characterised in that this method includes:The ID respectively asked in the batch request bag sent according to terminal, and ID and the mapping table acquisition pair of server-side address The server-side address answered;All requests of corresponding same services end address are encapsulated in a protocol package, and will according to corresponding server-side address The protocol package is sent to corresponding server-side;After protocol package is sent to corresponding server-side, receives processing of each server-side to request and return bag;The current place received When managing back bag and meeting that terminal receives the ability for handle back bag, complete no matter the current processing received time wrap whether be each server-side to Bag is returned in the processing of portion's request, all stops reception and handles back bag, and the processing currently received is returned bag returns to terminal, is not to wait for institute Bag is returned in the processing for having request;Wherein, the terminal receives the ability for handling back and wrapping and includes:What the terminal can receive handles back the size of bag;It is described It is current received when handle back bag and meeting that terminal receives the ability for handle back bag, regardless of the processing time currently received wrap whether Bag is returned to the processing all asked for each server-side, all stops reception and handles back bag, the processing currently received is returned bag returns To terminal, being not to wait for the processing time bag of all requests includes:Judge whether the current size for handling back bag received reaches What the terminal can receive handles back the size of bag, if reached, is judged to meeting;Otherwise, it is determined that to be unsatisfactory for.
- 2. batch processing subpackage method according to claim 1, it is characterised in that described to receive place of each server-side to request Managing back bag is:One asynchronous session of memory (session) A, is set, records the terminal and receives the ability for handling back bag, and receive each clothes Bag is returned in processing of the business end to request;What B, the asynchronous session of the memory judged currently to have received handles back whether bag meets that the terminal reception handles back bag Ability;If it is satisfied, it is transferred to C;If conditions are not met, it is transferred to D;C, bag is returned into the processing received and returns to the terminal, stop receiving processing time bag of each server-side to request;D, continue to processing of each server-side to request and return bag, return to B.
- 3. batch processing subpackage method according to claim 2, it is characterised in that bag is returned into the processing received and returns to institute Terminal is stated, is:The processing received is returned into encapsulation in a protocol package, returns to the terminal.
- 4. a kind of batch processing subpackage system, it is characterised in that the system includes:Terminal, logic module and one or more Server-side;Wherein:The terminal, for sending batch request bag;The logic module, for receiving the batch request bag, and according to the ID respectively asked in the batch request bag, and ID server-side addresses corresponding with the mapping table acquisition of server-side address;By all requests of corresponding same services end address It is encapsulated in a protocol package, and the protocol package is sent to corresponding server-side according to corresponding server-side address;The server-side, for receiving the corresponding protocol package;The logic module is additionally operable to receive processing time bag of each server-side to request;Bag is returned in the current processing received When meeting that terminal receives the ability for handle back bag, no matter whether it is each server-side to whole requests that the current processing received time is wrapped Processing return bag, all stop receiving and handle back bag, the processing currently received time bag is returned into terminal, is not to wait for all requests Processing return bag;Wherein, the terminal receives the ability for handling back and wrapping and includes:What the terminal can receive handles back the big of bag It is small;The logic module, is additionally operable to judge whether the current size for handling back bag received reaches the terminal and can connect The size for handling back bag of receipts, if reached, is judged to meeting that terminal receives the ability for handling back bag;Otherwise, it is determined that for not Meet that terminal receives the ability for handling back bag.
- 5. batch processing subpackage system according to claim 4, it is characterised in that the logic module, is additionally operable to:One asynchronous session of memory (session) A, is set, records the terminal and receives the ability for handling back bag, and by described The asynchronous session of memory receives processing of each server-side to request and returns bag;B, judge that the current processing received returns whether bag meets that the terminal reception is handled back by the asynchronous session of the memory The ability of bag;If it is satisfied, it is transferred to C;If conditions are not met, it is transferred to D;C, the processing received is returned by bag by the asynchronous session of the memory and returns to the terminal, and stop receiving each described Bag is returned in processing of the server-side to request;D, processing of each server-side to request is continued to by the asynchronous session of the memory and returns bag, return to B.
- 6. batch processing subpackage system according to claim 5, it is characterised in that the logic module, is additionally operable to pass through institute State the asynchronous session of memory and the processing received is returned into encapsulation in a protocol package, return to the terminal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210052072.1A CN103297474B (en) | 2012-03-01 | 2012-03-01 | A kind of batch processing subpackage method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210052072.1A CN103297474B (en) | 2012-03-01 | 2012-03-01 | A kind of batch processing subpackage method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103297474A CN103297474A (en) | 2013-09-11 |
CN103297474B true CN103297474B (en) | 2018-05-15 |
Family
ID=49097786
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210052072.1A Active CN103297474B (en) | 2012-03-01 | 2012-03-01 | A kind of batch processing subpackage method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103297474B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105100031B (en) * | 2014-05-23 | 2019-05-17 | 北京奇虎科技有限公司 | A kind of methods, devices and systems that batch addition is trusted |
CN106060007B (en) * | 2016-05-10 | 2019-10-11 | 上海斐讯数据通信技术有限公司 | A kind of user login information jitter-prevention processing method and system |
CN114884881B (en) * | 2022-05-12 | 2023-07-07 | 福建天晴在线互动科技有限公司 | Data compression transmission method and terminal |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101286875A (en) * | 2008-03-31 | 2008-10-15 | 华为技术有限公司 | Method, system, device and terminal for batch processing XML document |
CN102291324A (en) * | 2011-06-28 | 2011-12-21 | 北京神州泰岳软件股份有限公司 | Highly concurrent service request processing method |
-
2012
- 2012-03-01 CN CN201210052072.1A patent/CN103297474B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101286875A (en) * | 2008-03-31 | 2008-10-15 | 华为技术有限公司 | Method, system, device and terminal for batch processing XML document |
CN102291324A (en) * | 2011-06-28 | 2011-12-21 | 北京神州泰岳软件股份有限公司 | Highly concurrent service request processing method |
Also Published As
Publication number | Publication date |
---|---|
CN103297474A (en) | 2013-09-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101252591B (en) | Apparatus and method for realizing uplink and downlink data separation | |
CN105141660B (en) | A kind of Streaming Media management method and system | |
EP2755363B1 (en) | Data-fast-distribution method and device | |
CN108494817A (en) | Data transmission method, relevant apparatus and system | |
CN107483390A (en) | A kind of cloud rendering web deployment subsystem, system and cloud rendering platform | |
CN101764757A (en) | Method, device and system for content accessing | |
CN103885840B (en) | FCoE protocol acceleration engine IP core based on AXI4 bus | |
CN110198345A (en) | A kind of data request method, system and device and storage medium | |
CN103581248A (en) | Method and device for providing content distribution network CDN service | |
CN106302230B (en) | A kind of data transmission method and device | |
CN104113491A (en) | Data transmission method and device | |
CN101193041A (en) | Network data transmission method, device and system | |
CN103297474B (en) | A kind of batch processing subpackage method and system | |
CN109547824A (en) | A kind of video traffic method of servicing and system, storage medium and vpn server | |
CN109787981A (en) | Protocol conversion system, method, apparatus, equipment and storage medium | |
CN109327386A (en) | A kind of link aggregation method, device, equipment and readable storage medium storing program for executing | |
CN109818960A (en) | Data processing method and device | |
US7433971B2 (en) | Interface and related methods for dynamic channelization in an ethernet architecture | |
CN110062295A (en) | A kind of file resource acquisition methods and system | |
CN103220276A (en) | Method and system for network access, and gateway | |
CN103327129B (en) | For the domain name analytic method of more WAN mouthfuls of gateway devices | |
CN102291412B (en) | A kind of multimedia service realization method based on HTTP, system and device | |
CN101808037B (en) | Method and device for traffic management in switch network | |
CN104955125B (en) | Support dispatching method, terminal and the system of multiple types linking Internet | |
CN102138136B (en) | Method and apparatus for providing QoS for MP subscribers |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |