CN110233902A - Conversation processing method, device, electronic equipment and machine readable storage medium - Google Patents
Conversation processing method, device, electronic equipment and machine readable storage medium Download PDFInfo
- Publication number
- CN110233902A CN110233902A CN201910577047.7A CN201910577047A CN110233902A CN 110233902 A CN110233902 A CN 110233902A CN 201910577047 A CN201910577047 A CN 201910577047A CN 110233902 A CN110233902 A CN 110233902A
- Authority
- CN
- China
- Prior art keywords
- session
- cookie
- client
- source
- session 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1023—Server selection for load balancing based on a hash applied to IP addresses or costs
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/146—Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
The application provides a kind of conversation processing method, device, electronic equipment and machine readable storage medium.In this application, the first session request for carrying insertion cookie of the client is received;It creates source IP session corresponding with the insertion cookie of first session request and keeps list item;If receiving the second session request for not carrying insertion cookie of the client, list item is kept based on the source IP session, the Dialog processing that corresponding source IP session is kept is executed to second session request.It keeps list item associated with source IP session based on cookie, realizes after cookie loss, the request of cookie respective session is forwarded to the server-side of last visit by associated source IP session holding list item, it is therefore prevented that conversation ensure that business continuance.
Description
Technical field
This application involves field of communication technology more particularly to conversation processing method, device, electronic equipment and machine readable deposit
Storage media.
Background technique
Cookie is also referred to as cookies, and it is (clear to be that one kind can allow Web server that low volume data is stored into client
Look at host where device) hard disk or memory, or read from the hard disk of client a kind of technology of data.
When realizing, when user browses the website provided by Web server by browser, passed through by Web server
A very small text file being placed on the hard disk of client where browser, can recorde access website User ID,
The information such as password, the webpage browsed, residence time.When user accesses the website again, Web server passes through reading
Cookie learns the relevant information of user, so that it may corresponding movement made, the poster of user welcome is such as shown in the page, or
Person allows user not have to the just directly login etc. of input ID, password.In essence, cookie can be regarded as the identity of user
Card.But cookie cannot function as code execution, will not transmit virus, and proprietary for user, and can only be by providing its Web
Server is read.Most of content in cookie have passed through encryption, therefore general user is apparently some to have no
The alphanumeric of meaning, the web processing routine of only Web server just know their real meanings.
Summary of the invention
The application provides a kind of conversation processing method, and the load balancing that the method is applied in SiteServer LBS is set
Standby, the SiteServer LBS further includes client, server-side;Wherein, the client is through the load-balancing device and institute
State the connected communication of server-side, which comprises
Receive the first session request for carrying insertion cookie of the client;
It creates source IP session corresponding with the insertion cookie of first session request and keeps list item;
If receiving the second session request for not carrying insertion cookie of the client, it is based on the source IP meeting
Words keep list item, execute the Dialog processing that corresponding source IP session is kept to second session request.
Optionally, the source IP session holding list item includes at least the IP address of server-side corresponding with the client,
It is described that list item is kept based on the source IP session, second session request is executed at the session that corresponding source IP session is kept
Reason, comprising:
Second session request is forwarded to the IP address of server-side corresponding with the client.
Optionally, further includes:
By preset strategy, the ageing time that the source IP session keeps list item is updated;Wherein, the ageing time is greater than institute
State the expired time of insertion cookie.
Optionally, further includes:
If receiving the third session request for carrying insertion cookie of the client, the third session is asked
Seek the IP address being forwarded to insertion cookie corresponding with service end.
The application also provides a kind of Dialog processing device, and the load balancing that described device is applied in SiteServer LBS is set
Standby, the SiteServer LBS further includes client, server-side;Wherein, the client is through the load-balancing device and institute
The connected communication of server-side is stated, described device includes:
Receiving module receives the first session request for carrying insertion cookie of the client;
Creation module creates source IP session corresponding with the insertion cookie of first session request and keeps list item;
Dialog processing module, if receiving the second session request for not carrying insertion cookie of the client,
List item is kept based on the source IP session, the Dialog processing that corresponding source IP session is kept is executed to second session request.
Optionally, the source IP session holding list item includes at least the IP address of server-side corresponding with the client,
The Dialog processing module further,
Second session request is forwarded to the IP address of server-side corresponding with the client.
Optionally, the Dialog processing module further,
By preset strategy, the ageing time that the source IP session keeps list item is updated;Wherein, the ageing time is greater than institute
State the expired time of insertion cookie.
Optionally, the Dialog processing module further,
If receiving the third session request for carrying insertion cookie of the client, the third session is asked
Seek the IP address being forwarded to insertion cookie corresponding with service end.
The application also provides a kind of electronic equipment, including communication interface, processor, memory and bus, and the communication connects
Pass through bus between mouth, the processor and the memory to be connected with each other;
Machine readable instructions are stored in the memory, the processor is executed by calling the machine readable instructions
Above-mentioned method.
The application also provides a kind of machine readable storage medium, and the machine readable storage medium is stored with machine readable finger
It enables, the machine readable instructions realize the above method when being called and being executed by processor.
By above embodiments, keeps list item associated with source IP session based on cookie, realize and lost in cookie
Afterwards, cookie respective session is requested to keep list item to be forwarded to the server-side of last visit by associated source IP session, is prevented
Conversation, ensure that business continuance.
Detailed description of the invention
Fig. 1 is a kind of networking diagram for SiteServer LBS that an exemplary embodiment provides;
Fig. 2 is a kind of flow chart for conversation processing method that an exemplary embodiment provides;
Fig. 3 is a kind of block diagram for Dialog processing device that an exemplary embodiment provides;
Fig. 4 is the hardware structure diagram for a kind of electronic equipment that an exemplary embodiment provides.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the application.
It is only to be not intended to be limiting the application merely for for the purpose of describing particular embodiments in term used in this application.
It is also intended in the application and the "an" of singular used in the attached claims, " described " and "the" including majority
Form, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein refers to and wraps
It may be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application
A little information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not departing from
In the case where the application range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as
One information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ...
When " or " in response to determination ".
In order to make those skilled in the art more fully understand the technical solution in the embodiment of the present application, below first to this Shen
Please the relevant technologies of Dialog processing that are related to of embodiment, be briefly described.
Referring to Figure 1, Fig. 1 is a kind of networking diagram for SiteServer LBS that one embodiment of the application provides.
SiteServer LBS as shown in Figure 1 includes: load-balancing device (SLB), client (C1, C2, C3), server-side
(S1,S2,S3);
Wherein, client is through network as shown in Figure 1, is connected with server-side communication by load-balancing device.
When realizing, the session request of client as shown in Figure 1 to server-side can be forwarded by load-balancing device
To the server-side by being selected by load-balancing algorithm.
Such as: the session request from C1 client can be transmitted to server-side S1 by load balancing by SLB;SLB can
Server-side S2 will be transmitted to by load balancing from the session request of C2 client;SLB can will be from C3 client
Session request is transmitted to server-side S3 by load balancing.
On the basis of group-network construction illustrated above, the application is directed to one kind, based on cookie and source IP session
Keep the technical solution of the associated Dialog processing of list item.
When realizing, SiteServer LBS includes load-balancing device, client, server-side;Wherein, the client warp
The load-balancing device is connected communication with the server-side.
Further, load-balancing device receives the first session request for carrying insertion cookie of the client;
It creates source IP session corresponding with the insertion cookie of first session request and keeps list item;If receiving the client
The second session request of insertion cookie is not carried, then list item is kept based on the source IP session, second session is asked
It asks and executes the Dialog processing that corresponding source IP session is kept.
In above scheme, keeps list item associated with source IP session based on cookie, realizes after cookie loss,
The request of cookie respective session is forwarded to the server-side of last visit by associated source IP session holding list item, it is therefore prevented that meeting
Words are interrupted, and ensure that business continuance.
The application is described below by specific embodiment and in conjunction with specific application scenarios.
Referring to FIG. 2, Fig. 2 is a kind of flow chart for conversation processing method that one embodiment of the application provides, the method
Applied to the load-balancing device in SiteServer LBS, the SiteServer LBS further includes client, server-side;Wherein,
The client is connected communication through the load-balancing device with the server-side, and the above method executes following steps:
Step 202, the first session request for carrying insertion cookie for receiving the client.
Step 204, creation source IP session corresponding with the insertion cookie of first session request keep list item.
If step 206, the second session request for not carrying insertion cookie for receiving the client, are based on institute
It states source IP session and keeps list item, the Dialog processing that corresponding source IP session is kept is executed to second session request.
In the present specification, above-mentioned load-balancing device may include that be integrated with load-balancing function any sets
It is standby.For example, in practical applications, above-mentioned load-balancing device can specifically include interchanger with load-balancing function, road
By device, firewall, server and load balancer etc..
In the present specification, above-mentioned client, including one or more equipment to initiate a session request to above-mentioned server-side.
For example, above-mentioned client may include wherein one or more combinations in C1, C2, C3 as shown in Figure 1.
In the present specification, above-mentioned server-side, including receive above-mentioned client and initiate a session request and execute corresponding business
One or more equipment of processing.
For example, above-mentioned server-side may include one of equipment or multiple equipment in S1, S2, S3 as shown in Figure 1
Combination.
In the present specification, above-mentioned session request, refer to that above-mentioned client initiates to above-mentioned server-side based on http
(HyperText Transfer Protocol, hypertext transfer protocol) or https (Hyper Text Transfer
Protocol over Secure Socket Layer, Hyper text transfer security protocol) service request message.
For example, shown in Figure 1, above-mentioned session request can be the service request report based on http that C1 is initiated to S1
Text is also possible to the service request message based on https that C1 is initiated to S1.
In the present specification, above-mentioned SiteServer LBS, refer to including above-mentioned load-balancing device, above-mentioned client, on
State the whole network system of server-side;Wherein, above-mentioned client is connected communication through above-mentioned load-balancing device with above-mentioned server-side.
Such as: shown in Figure 1, above-mentioned SiteServer LBS includes SLB (above-mentioned load-balancing device), above-mentioned client
Hold (C1, C2, C3), above-mentioned server-side (S1, S2, S3);Wherein, above-mentioned client is through above-mentioned load-balancing device and above-mentioned service
End, which is connected, to be communicated.
Below by way of specific embodiment, and combine " cookie is associated with list item creation ", " at the session that cookie loses
Reason ", " Dialog processing that cookie does not lose ", are described in detail the technical solution of the application being related to:
In the present specification, above-mentioned client initiates a session request to above-mentioned server-side;The session request is through above-mentioned load
Equalizing equipment is forwarded to above-mentioned server-side through preset load-balancing algorithm, by the session request, to be directed to by above-mentioned server-side
The session request executes corresponding business processing.
When realizing, Virtual Service Address that above-mentioned load-balancing device provides above-mentioned client.Above-mentioned client can
To send session request by accessing the Virtual Service Address, above-mentioned load-balancing device, can be with by the Virtual Service Address
The session request is distributed to above-mentioned server-side.
For example, referring to Figure 1, the Virtual Service Address of SLB as shown in Figure 1 is 100.30.5.1, load-balancing device
The Virtual Service Address 100.30.5.1 that SLB provides above-mentioned client (C1, C2, C3).Above-mentioned client can pass through access
The Virtual Service Address sends session request, and load-balancing device SLB, can be by the session request by the Virtual Service Address
It is distributed to above-mentioned server-side.
It should be noted that the session request of above-mentioned client to above-mentioned server-side can be combined there are many corresponding, such as:
C1-S1,C2-S2,C3-S3;For another example: the session request pair of C1-S2, C2-S3, C3-S1 above-mentioned client and above-mentioned server-side
It should be related to, be not especially limited in the present note.
In this specification, above-mentioned server-side further executes the session and asks after the session request for receiving above-mentioned client
Corresponding business processing is sought, and by the corresponding conversational response of the session request, above-mentioned client is returned to by above-mentioned load-balancing device
End.
For example, shown in Figure 1, above-mentioned client is S1, above-mentioned client is C1, and S1 is in the session request for receiving C1
Afterwards, it further executes the session request and corresponds to business processing, and by the corresponding conversational response of the session request, pass through load balancing
Equipment SLB returns to C1.
In this specification, above-mentioned insertion cookie refers to above-mentioned load-balancing device in the meeting for receiving above-mentioned server-side
After words response, the server info of above-mentioned server-side is inserted into the cookie of the head designated position of above-mentioned conversational response.
Then above example continues to illustrate, and load-balancing device SLB is receiving session request pair from S1, with C1
After the conversational response answered, load-balancing device SLB by the server info of S1 (such as: IP address, the type of server of S1 of S1
Deng) in the form of cookie, it is inserted into the head designated position of the conversational response.
In this specification, further, after above-mentioned insertion cookie has been inserted into the conversational response, above-mentioned load is equal
The conversational response is sent to above-mentioned client by the equipment that weighs.
Then above example continues to illustrate, and above-mentioned load-balancing device carries the insertion cookie of the server info of S1
It is sent to C1.
In this specification, further, above-mentioned insertion is got from above-mentioned load-balancing device in above-mentioned client
Cookie, and it is stored in local, so as to which above-mentioned insertion can be carried when above-mentioned client initiates session request next time
Cookie, and parsed by above-mentioned load-balancing device for the insertion cookie in the session request, obtain the insertion
Last session in cookie requests corresponding server info, such as: the IP address of S1, thus by above-mentioned load-balancing device
By this, session request is forwarded to S1 next time.
In this specification, above-mentioned first session request, refer to above-mentioned client carries the upper of above-mentioned insertion cookie
State session request.
Then above example continues to illustrate, and what above-mentioned first session request can be C1 carries above-mentioned insertion cookie
The above-mentioned session request of (the insertion cookie for carrying the server info of S1).
In this specification, above-mentioned load-balancing device receives carry insertion cookie above-mentioned first of above-mentioned client
Session request.
Then above example continues to illustrate, and the above-mentioned insertion cookie that carries that SLB receives C1 (carries the server of S1
The insertion cookie of information) session request.
In order to facilitate understanding, " source IP session holding " concept under first introducing here.Under normal conditions, load-balancing device exists
When making load balancing, the main foundation at corresponding with service end can be distributed as it according to the source IP address of access request;And " source IP meeting
Words are kept " refer to, load-balancing device is making load balancing to all access requests of the client from same source IP address
When, all access requests of the client can be assigned to same server-side.
When realizing, load-balancing device is based on " source IP session keeps table " execution " source IP session holding " Dialog processing;
Wherein, source IP session keeps table to include at least the corresponding clothes distributed of the corresponding source IP address of above-mentioned session request, the session request
Business end IP address.
Then above example continues to illustrate, and source IP session keeps the table structure and contents in table of table, refers to shown in table 1:
Table 1
The source IP session that every a line as shown in Table 1 just corresponds in " source IP session keeps table " keeps list item.It is negative
The target session request that equalizing equipment is C1 to the correspondence client device for being 10.30.5.6 from same source IP address is carried to make
When load balancing, all access requests of client device C1 can be assigned to the corresponding with service that IP address is 100.30.5.6
End equipment S1.Similarly, as shown in table 1, C2 and S2, C3 and S3 respectively correspond respective source IP session and keep list item.
In the present specification, above-mentioned source IP session keeps list item, refer to above-mentioned load-balancing device be above-mentioned client and
The corresponding table item in " source IP session keeps table " that corresponding with service end is established;Wherein, above-mentioned source IP session keeps list item at least to wrap
Include the IP address of server-side corresponding with above-mentioned client.
Then above example continues to illustrate, and above-mentioned client is C1, then it is such as table 1 that the corresponding source IP session of C1, which keeps list item,
The first row shown in, it is 100.30.5.6 (S1 as shown in Figure 1 which, which keeps the IP address of the corresponding server-side of list item,
IP address).
Certainly, when realizing, it further includes that the source IP address of above-mentioned client (refers to table that above-mentioned source IP session, which keeps list item,
" source IP address " field shown in 1).
In this specification, further, after receiving above-mentioned first session request, the creation of above-mentioned load-balancing device with
The corresponding source IP session of the insertion cookie of above-mentioned first session request keeps list item.
Then above example continues to illustrate, and (C1's carries with above-mentioned first session request for load-balancing device SLB creation
Above-mentioned insertion cookie) the corresponding source IP session of insertion cookie (the insertion cookie for carrying the server info of S1) protect
List item is held, table is kept with the associated source IP session of insertion cookie, refers to exemplified by table 2:
Table 2
Source IP session holding table as shown in Table 2 is changed on the basis of table 1, and table 2 and the difference of table 1 are,
Table 2 increases " association insertion cookie " field compared to table 1, and after increasing the field, every source IP session keeps list item (to correspond to such as
A line in table 2) " source IP session keeps list item " as shown in Table 1 can be associated with " insertion cookie ", that is, on
Stating source IP session keeps list item on the basis of saving the list item of original " source IP session keeps table ", also saves and above-mentioned first
The corresponding relationship of the insertion cookie of session request.
It should be noted that being based on the load balancing mode of " source IP session keeps table " in existing realization and based on " slotting
Enter the load balancing mode of cookie " be it is independent, the two has no to be associated with.And
In the present specification, above-mentioned second session request refers to the above-mentioned client after above-mentioned first session request
The above-mentioned session request for not carrying above-mentioned insertion cookie.
Then above example continues to illustrate, when the existence for artificially removing cookie information (ensureing user security) or cookie
Period reaches time restriction or user and closes after system after browser removes cookie automatically, and above-mentioned client is sent
The above-mentioned session request of cookie is not carried, such as: above-mentioned second session request can be the C1's after above-mentioned first request
The above-mentioned session request of above-mentioned insertion cookie (not carrying the insertion cookie of the server info of S1) is not carried.
In the present specification, further, after above-mentioned client sends above-mentioned second session request, above-mentioned load balancing
If equipment receives above-mentioned second session request of above-mentioned client, list item is kept based on above-mentioned source IP session, to above-mentioned the
Two session requests execute the Dialog processing that corresponding source IP session is kept.
Then above example continues to illustrate, if load-balancing device SLB receives above-mentioned second session request of C1, base
List item is kept in corresponding source IP session as shown in Table 2, corresponding source IP session is executed to above-mentioned second session request and is kept
Dialog processing.
In a kind of embodiment shown, above-mentioned load-balancing device by above-mentioned second session request be forwarded to it is above-mentioned
The IP address of the corresponding server-side of client.
Then above example continues to illustrate, and above-mentioned second session request of C1 is forwarded to C1 pairs by load-balancing device SLB
The IP address 100.30.5.6 of the server-side S1 answered.
In order to facilitate understanding, under first introducing here " ageing time ", since load-balancing device resource is limited, source IP session
It is also limited that source IP session in holding table, which keeps list item number, in general, load-balancing device is protected by setting source IP session
The corresponding ageing time of list item is held, it is being more than preset that the corresponding source IP session of the session to realize no message interaction, which keeps list item,
After ageing time (namely digestion period), just deletes the source IP session and keep list item.Such as: ageing time is 5 minutes, 5 minutes
Interior, 3 source IP sessions as shown in Table 2 keep corresponding 3 sessions of list item without message interaction, then are more than that after five minutes, load is equal
Weighing apparatus equipment then deletes 3 source IP sessions and keeps list item.
In the present specification, the expired time of above-mentioned insertion cookie refers to the life cycle of above-mentioned insertion cookie.
When realizing, insertion cookie realizes that there are life cycles as cookie, by cookie.The life of cookie
The expired time of cycle of deposit namely cookie was usually indicated by the value of the Exprire field in cookie, in life cycle
Interior cookie is effective, will be automatically left out beyond cookie life cycle;When the value of Exprire is 0 or is empty, then refer to
Show when user exits browser (being located in above-mentioned client), cookie will not be saved, to ensure the information security of user.Than
Such as, the expired time of above-mentioned insertion cookie can be it is expired more than 10 minutes or expired more than 2 hours or expired more than 2 days or
It is expired more than January etc..
In the present specification, above-mentioned second session request to be forwarded to the IP of server-side corresponding with above-mentioned client
Behind location, above-mentioned load-balancing device needs to update the ageing time that above-mentioned source IP session keeps list item.
In a kind of embodiment shown, above-mentioned load-balancing device presses preset strategy, updates above-mentioned source IP session and protects
Hold the ageing time of list item;Wherein, above-mentioned ageing time is greater than the expired time of above-mentioned insertion cookie.
Then above example continues to illustrate, it is assumed that and the expired time of above-mentioned insertion cookie is T (time of any length),
The then ageing time that the IP session keeps the ageing time of list item to be greater than by preset strategy, such as: the IP session keeps list item
Ageing time be 2T+1.Above-mentioned second session request of C1 is forwarded to the corresponding server-side of C1 in load-balancing device SLB
After the IP address 100.30.5.6 of S1, load-balancing device SLB updates the corresponding IP session holding table of the session by preset strategy
The ageing time of item (the first row as shown in Table 2) is 2T+1.
In the present specification, above-mentioned third session request refers to the above-mentioned client after above-mentioned first session request
The above-mentioned session request for carrying above-mentioned insertion cookie.
Then above example continues to illustrate, and above-mentioned third session request can be the C1's after above-mentioned first session request
Carry the above-mentioned session request of above-mentioned insertion cookie (the insertion cookie for carrying the server info of S1).Above-mentioned third
The above-mentioned insertion cookie that carries that session request is also possible to the C1 after above-mentioned first session request (carries the service of S2
The insertion cookie of device information) above-mentioned session request.
In the present specification, after receiving above-mentioned third session request, above-mentioned load-balancing device can be based on above-mentioned the
Insertion cookie in three session requests executes forwarding to above-mentioned third session request.
In a kind of embodiment shown, if above-mentioned load-balancing device receive above-mentioned client carry insertion
Above-mentioned third session request is then forwarded to and insertion cookie corresponding with service end by the above-mentioned third session request of cookie
IP address.
Then above example continues to illustrate, and after above-mentioned load-balancing device receives above-mentioned third session request, can incite somebody to action
Above-mentioned third session request is forwarded to the IP address at the insertion cookie corresponding with service end carried with it.Such as: if above-mentioned third
The corresponding insertion cookie of session request is the server info for carrying S1, then load-balancing device SLB is by above-mentioned third meeting
Words request can be forwarded to S1 as shown in Figure 1;If the corresponding insertion cookie of above-mentioned third session request is to carry S2's
Server info, then above-mentioned third session request can be forwarded to S2 as shown in Figure 1 by load-balancing device SLB.
In above technical scheme, keep list item associated with source IP session based on cookie, on the one hand, to realize
After cookie loses, the request of cookie respective session is forwarded to the clothes of last visit by associated source IP session holding list item
Business end, it is therefore prevented that conversation ensure that business continuance;On the other hand, realizing load-balancing device can support simultaneously
Based on cookie and based on the session request forwarding that source IP session is kept, overcomes in existing scheme while can only support to be based on
The forwarding of cookie session request or the session request forwarding kept based on source IP session.
Fig. 3 is a kind of block diagram for Dialog processing device that one exemplary embodiment of the application provides.Implement with the above method
Example is corresponding, and present invention also provides a kind of embodiment of Dialog processing device, described device is applied in SiteServer LBS
Load-balancing device, the SiteServer LBS further includes client, server-side;Wherein, the client is through the load
Equalizing equipment is connected communication with the server-side, please refers to a kind of Dialog processing device 30, described device packet exemplified by Fig. 3
It includes:
Receiving module 301 receives the first session request for carrying insertion cookie of the client;
Creation module 302 creates source IP session corresponding with the insertion cookie of first session request and keeps list item;
Dialog processing module 303, if receiving the second session request for not carrying insertion cookie of the client,
List item is then kept based on the source IP session, second session request is executed at the session that corresponding source IP session is kept
Reason.
In the present embodiment, the source IP session keeps list item including at least the IP of server-side corresponding with the client
Address, the Dialog processing module 303 further,
Second session request is forwarded to the IP address of server-side corresponding with the client.
In the present embodiment, the Dialog processing module 303 further,
By preset strategy, the ageing time that the source IP session keeps list item is updated;Wherein, the ageing time is greater than institute
State the expired time of insertion cookie.
In the present embodiment, the Dialog processing module 303 further,
If receiving the third session request for carrying insertion cookie of the client, the third session is asked
Seek the IP address being forwarded to insertion cookie corresponding with service end.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The module of explanation may or may not be physically separated, and the component shown as module can be or can also be with
It is not physical module, it can it is in one place, or may be distributed on multiple network modules.It can be according to actual
The purpose for needing to select some or all of the modules therein to realize application scheme.Those of ordinary skill in the art are not paying
Out in the case where creative work, it can understand and implement.
System, device, module or the module that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can
To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of any several equipment.
The embodiment of the Dialog processing device of the application can be using on electronic equipment shown in Fig. 4.Installation practice
It can also be realized by way of hardware or software and hardware combining by software realization.Taking software implementation as an example, as one
Device on a logical meaning is by the processor of electronic equipment where it by calculating corresponding in machine readable storage medium
Machine program instruction runs the machine-executable instruction of formation after reading.For hardware view, as shown in figure 4, for the application's
A kind of hardware structure diagram of electronic equipment where Dialog processing device, in addition to processor shown in Fig. 4, communication interface, bus with
And except machine readable storage medium, the practical function of electronic equipment in embodiment where device generally according to the electronic equipment
Can, it can also include other hardware, this is repeated no more.
Accordingly, it the embodiment of the present application also provides the hardware configuration of a kind of electronic equipment of Fig. 3 shown device, refers to
Fig. 4, Fig. 4 are the hardware structural diagram of a kind of electronic equipment provided by the embodiments of the present application.The equipment includes: communication interface
401, processor 402, machine readable storage medium 403 and bus 404;Wherein, communication interface 401, processor 402, machine can
It reads storage medium 403 and mutual communication is completed by bus 404.Wherein, communication interface 401, for carrying out network communication.Place
Reason device 402 can be a central processing unit (CPU), and processor 402 can execute to be stored in machine readable storage medium 403
Machine readable instructions, to realize process as described above.
Machine readable storage medium 403 referred to herein can be any electronics, magnetism, optics or other physical stores
Device may include or store information, such as executable instruction, data, etc..For example, machine readable storage medium may is that easily
Lose memory, nonvolatile memory or similar storage medium.Specifically, machine readable storage medium 403 can be RAM
(Radom Access Memory, random access memory), flash memory, memory driver (such as hard disk drive), solid state hard disk,
Any kind of storage dish (such as CD, DVD) perhaps similar storage medium or their combination.
So far, hardware configuration description shown in Fig. 4 is completed.
In addition, the embodiment of the present application also provides a kind of machine readable storage medium including machine-executable instruction, example
Such as the machine-readable readable storage medium storing program for executing 403 in Fig. 4, the machine-executable instruction can be by Dialog processing device
Device 402 is managed to execute to realize data processing method described above.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus
Realization process, details are not described herein.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the application
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the application, these modifications, purposes or
Person's adaptive change follows the general principle of the application and including the undocumented common knowledge in the art of the application
Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the application are by following
Claim is pointed out.
It should be understood that the application is not limited to the precise structure that has been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.Scope of the present application is only limited by the accompanying claims.
The foregoing is merely the preferred embodiments of the application, not to limit the application, all essences in the application
Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the application protection.
Claims (10)
1. a kind of conversation processing method, which is characterized in that the method is applied to the load-balancing device in SiteServer LBS,
The SiteServer LBS further includes client, server-side;Wherein, the client is through the load-balancing device and the clothes
Being engaged in, end is connected to be communicated, which comprises
Receive the first session request for carrying insertion cookie of the client;
It creates source IP session corresponding with the insertion cookie of first session request and keeps list item;
If receiving the second session request for not carrying insertion cookie of the client, protected based on the source IP session
List item is held, the Dialog processing that corresponding source IP session is kept is executed to second session request.
2. the method according to claim 1, wherein the source IP session keeps list item to include at least and the visitor
The IP address of the corresponding server-side in family end, it is described that list item is kept based on the source IP session, second session request is executed
The Dialog processing that corresponding source IP session is kept, comprising:
Second session request is forwarded to the IP address of server-side corresponding with the client.
3. according to the method described in claim 2, it is characterized by further comprising:
By preset strategy, the ageing time that the source IP session keeps list item is updated;Wherein, the ageing time is greater than described insert
Enter the expired time of cookie.
4. the method according to claim 1, wherein further include:
If receiving the third session request for carrying insertion cookie of the client, the third session request is turned
It is sent to the IP address with insertion cookie corresponding with service end.
5. a kind of Dialog processing device, which is characterized in that described device is applied to the load-balancing device in SiteServer LBS,
The SiteServer LBS further includes client, server-side;Wherein, the client is through the load-balancing device and the clothes
Being engaged in, end is connected to be communicated, and described device includes:
Receiving module receives the first session request for carrying insertion cookie of the client;
Creation module creates source IP session corresponding with the insertion cookie of first session request and keeps list item;
Dialog processing module is based on if receiving the second session request for not carrying insertion cookie of the client
The source IP session keeps list item, executes the Dialog processing that corresponding source IP session is kept to second session request.
6. device according to claim 5, which is characterized in that the source IP session keeps list item to include at least and the visitor
The IP address of the corresponding server-side in family end, the Dialog processing module further,
Second session request is forwarded to the IP address of server-side corresponding with the client.
7. device according to claim 6, which is characterized in that the Dialog processing module is further, press preset strategy, more
The new source IP session keeps the ageing time of list item;Wherein, the ageing time be greater than it is described insertion cookie it is expired when
Between.
8. device according to claim 5, which is characterized in that the Dialog processing module further,
If receiving the third session request for carrying insertion cookie of the client, the third session request is turned
It is sent to the IP address with insertion cookie corresponding with service end.
9. a kind of electronic equipment, which is characterized in that including communication interface, processor, memory and bus, the communication interface,
It is connected with each other between the processor and the memory by bus;
Machine readable instructions are stored in the memory, the processor is executed by calling the machine readable instructions as weighed
Benefit requires 1 to 4 described in any item methods.
10. a kind of machine readable storage medium, which is characterized in that the machine readable storage medium is stored with machine readable finger
It enables, the machine readable instructions realize the described in any item methods of Claims 1-4 when being called and being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910577047.7A CN110233902B (en) | 2019-06-28 | 2019-06-28 | Session processing method and device, electronic equipment and machine-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910577047.7A CN110233902B (en) | 2019-06-28 | 2019-06-28 | Session processing method and device, electronic equipment and machine-readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110233902A true CN110233902A (en) | 2019-09-13 |
CN110233902B CN110233902B (en) | 2022-03-01 |
Family
ID=67857759
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910577047.7A Active CN110233902B (en) | 2019-06-28 | 2019-06-28 | Session processing method and device, electronic equipment and machine-readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110233902B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111953700A (en) * | 2020-08-18 | 2020-11-17 | 中国工商银行股份有限公司 | Session keeping method and device |
CN113612851A (en) * | 2021-08-11 | 2021-11-05 | 山石网科通信技术股份有限公司 | Remote connection method and device, storage medium and processor |
CN114363397A (en) * | 2021-12-14 | 2022-04-15 | 阿里巴巴(中国)有限公司 | Session processing method, device, electronic equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101340371A (en) * | 2008-08-12 | 2009-01-07 | 杭州华三通信技术有限公司 | Session keeping method and load balance apparatus |
CN104811488A (en) * | 2015-04-13 | 2015-07-29 | 深信服网络科技(深圳)有限公司 | Load balancing equipment-based session keeping method and system and load balancing equipment |
CN107360251A (en) * | 2017-08-16 | 2017-11-17 | 中国工商银行股份有限公司 | Method, system and the load balancing apparatus that session is kept |
CN107995304A (en) * | 2017-12-13 | 2018-05-04 | 杭州迪普科技股份有限公司 | A kind of session keeping method and device based on cookie |
US20180351936A1 (en) * | 2017-06-02 | 2018-12-06 | Dell Products L.P. | Http session validation module |
CN109743357A (en) * | 2018-12-13 | 2019-05-10 | 杭州迪普科技股份有限公司 | A kind of successional implementation method of business access and device |
-
2019
- 2019-06-28 CN CN201910577047.7A patent/CN110233902B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101340371A (en) * | 2008-08-12 | 2009-01-07 | 杭州华三通信技术有限公司 | Session keeping method and load balance apparatus |
CN104811488A (en) * | 2015-04-13 | 2015-07-29 | 深信服网络科技(深圳)有限公司 | Load balancing equipment-based session keeping method and system and load balancing equipment |
US20180351936A1 (en) * | 2017-06-02 | 2018-12-06 | Dell Products L.P. | Http session validation module |
CN107360251A (en) * | 2017-08-16 | 2017-11-17 | 中国工商银行股份有限公司 | Method, system and the load balancing apparatus that session is kept |
CN107995304A (en) * | 2017-12-13 | 2018-05-04 | 杭州迪普科技股份有限公司 | A kind of session keeping method and device based on cookie |
CN109743357A (en) * | 2018-12-13 | 2019-05-10 | 杭州迪普科技股份有限公司 | A kind of successional implementation method of business access and device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111953700A (en) * | 2020-08-18 | 2020-11-17 | 中国工商银行股份有限公司 | Session keeping method and device |
CN113612851A (en) * | 2021-08-11 | 2021-11-05 | 山石网科通信技术股份有限公司 | Remote connection method and device, storage medium and processor |
CN114363397A (en) * | 2021-12-14 | 2022-04-15 | 阿里巴巴(中国)有限公司 | Session processing method, device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110233902B (en) | 2022-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3391616B1 (en) | Device management with tunneling | |
US8514750B2 (en) | Multiplexed communication for duplex applications | |
RU2498520C2 (en) | Method of providing peer-to-peer communication on web page | |
US9817658B2 (en) | Elastic application framework for deploying software | |
CN107948167A (en) | A kind of method and apparatus of single-sign-on | |
CN110233902A (en) | Conversation processing method, device, electronic equipment and machine readable storage medium | |
CN104380278A (en) | Device, system, and method for client-governed session persistency between one or more clients and servers of a data center | |
US9331915B1 (en) | Dynamic network traffic mirroring | |
US10523532B1 (en) | Multiple queueing for distributed environments | |
CN110191031A (en) | Network resource access method, device, electronic equipment | |
CN110166570A (en) | Service conversation management method, device, electronic equipment | |
CN102119512A (en) | Distributed load balancer | |
US9906552B1 (en) | Managing system load | |
CN110247806A (en) | Session failure processing method, device, electronic equipment | |
CN110474820B (en) | Flow playback method and device and electronic equipment | |
US10284670B1 (en) | Network-controlled device management session | |
CN115315926A (en) | Reverse proxy server for implementing application layer based and transport layer based security rules | |
US10939480B2 (en) | Enabling communications between a controlling device and a network-controlled device via a network-connected device service over a mobile communications network | |
US10396828B2 (en) | Virtualized hardware support for mobile devices | |
CN108932238A (en) | A kind of cross-domain communication method and device | |
US10462057B1 (en) | Shaping network traffic using throttling decisions | |
CN110650209A (en) | Method and device for realizing load balance | |
US10116773B2 (en) | Packet processing method and related device that are applied to network device | |
CN108829340B (en) | Storage processing method, device, storage medium and processor | |
US10019249B1 (en) | Techniques for minimally invasive application updates and data transfer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |