CN101883130B - Storage method and device of page frame stream conversation information - Google Patents

Storage method and device of page frame stream conversation information Download PDF

Info

Publication number
CN101883130B
CN101883130B CN200910137698.0A CN200910137698A CN101883130B CN 101883130 B CN101883130 B CN 101883130B CN 200910137698 A CN200910137698 A CN 200910137698A CN 101883130 B CN101883130 B CN 101883130B
Authority
CN
China
Prior art keywords
page
frame stream
conversation information
client
page frame
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
CN200910137698.0A
Other languages
Chinese (zh)
Other versions
CN101883130A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN200910137698.0A priority Critical patent/CN101883130B/en
Publication of CN101883130A publication Critical patent/CN101883130A/en
Application granted granted Critical
Publication of CN101883130B publication Critical patent/CN101883130B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention provides a storage method and a device of page frame stream conversation information. The method concretely comprises the following steps: firstly, converting page frame stream conversation information sequences created by the service end into character strings when a client operates a service processing page frame; and then, outputting the serialized character strings as page frame parameters preset in the client. Thereby, the page frame conversation information can be stored in the page frame of the client, so the memory occupation of the server can be reduced, and the stable and reliable operation of the server end can be ensured.

Description

The store method of page frame stream conversation information and device
Technical field
The present invention relates to network communication field, relate in particular to a kind of store method and device of page frame stream conversation information.
Background technology
At present, along with the development of telecommunication service, a large amount of application programs based on webpage Web need to keep a large amount of state informations across the page, and such as user is in information such as the entry information at a upper interface, the intermediate treatment of program after a upper page operation.Past, these information data major parts were brought in preservation by conventional session session at server, and these sessions have taken the internal memory of a large amount of servers.And cause because the system failure root of most Web page application programs is all that memory consumption is excessive, and the existence of wherein high-volume conversation data is to cause server memory to consume an excessive major reason, the memory source that therefore reduces server takies in the web application that builds high reliability and is significant.
In prior art scheme, applying more is page flow technology, for example WebSphere branch transition development kit BTT (the Branch Transformation Toolkitfor WebSphere Studio) system of current telecommunications industry large-scale promotion, this system has just adopted page flow technology at boundary layer.For a page flow technology, mainly comprise following part:
1) description of page flow process, this is essential for page flow technology, because page flow engine need to depend on the description of page flow, could judge whether a page flow finishes;
2) page frame stream conversation data management system, this system need to be moved at server end the hypervisor of page frame stream conversation data, by this program, manage Various types of data, and remove when being necessary, such as, in the situation such as page flow finishes or page flow is overtime;
3) be specially the client of this type of functional development.
From the scheme of above-mentioned prior art, can find out, prior art does not have real settlement server memory source and takies too high problem, although not re-using conventional session, current page flow technology keeps page flow data, but because page flow data still need to be preserved on server, so created a kind of new conversation mechanism, i.e. page frame stream conversation.But this page frame stream conversation mechanism and traditional not tangible difference of conversation mechanism, in actual applications, the memory consumption of server end is still too high.
Summary of the invention
The embodiment of the present invention provides a kind of store method and device of page frame stream conversation information, can reduce the memory cost of server, thereby guarantees the reliable and stable operation of server.
The embodiment of the present invention provides a kind of store method of page frame stream conversation information, comprising:
When client operates the processing page of business, the page frame stream conversation information sequence that server end is created turns to character string;
Character string after serializing is output as to page parameter preset in described client.
The embodiment of the present invention also provides a kind of save set of page frame stream conversation information, comprising:
Serializing unit, for when client operates the processing page of business, the page frame stream conversation information sequence that server end is created turns to character string;
Parameter storage unit, for being output as the page parameter preset in described client by the character string after described serializing unit sequence.
By above-mentioned provided technical scheme, can be found out, when client operates the processing page of business, the page frame stream conversation information sequence first server end being created turns to character string; Then the character string after serializing is output as to page parameter preset in described client.So just page frame stream conversation information can be kept in the page of client, thereby reduce the memory cost of server, and guarantee the reliable and stable operation of server end.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of 1 supplying method of the embodiment of the present invention;
The nested structure schematic diagram of business object in the object lesson that Fig. 2 lifts for the embodiment of the present invention 1;
In Fig. 3 is the embodiment of the present invention 1 act object lesson, client and server end carries out mutual schematic diagram;
Fig. 4 is the structural representation of 2 generators of the embodiment of the present invention.
Embodiment
The embodiment of the present invention provides a kind of store method and device of page frame stream conversation information.Can make page frame stream conversation information be kept in the page of client, thereby reduce the memory cost of server, guarantee the stable operation of server; When server failure, can on other server, rebuild session information, thereby guarantee greatly the reliability service of application program simultaneously.
Embodiment 1: the embodiment of the present invention 1 provides a kind of store method of page frame stream conversation information, is illustrated in figure 1 the schematic flow sheet of 1 supplying method of the present embodiment, and described method comprises:
Step 11: when client operates the processing page of business, the page frame stream conversation information sequence that server end is created turns to character string.
In this step 11, when client operates the processing page of business, when namely user clicks menu or newly initiate a business operation in system, client and server end can carry out corresponding mutual, and the business application in this server end will create corresponding page frame stream conversation information.In specific implementation process, the form that this page frame stream conversation information can page frame stream conversation object is preserved.
After server end has created corresponding page frame stream conversation information, just can, when the page echo of client, this page frame stream conversation information sequence be turned to corresponding character string.In specific implementation process, page frame stream conversation information sequence is turned to character string and can have multiple implementation, for example this page frame stream conversation information can be encoded to the form based on key-value pair, and the stack of object data form, make this page frame stream conversation information sequence turn to character string.
For instance, a for example simple java object (java bean) structure, be in fact and following programming statement: Map<String, Object> is consistent, the attribute-name of bean be just mapped as Map's " key ", and the property value of bean be just mapped as Map's " value ", for more complicated object model, this structure is nested often.
In addition, be generally used in the business object of preservation state and page frame stream conversation information and also often with Container Type or array type, characterize, therefore, as long as realize the mapping of above structure and character string, be that object tree is mapped as Map form, nested object map is nested Map form, and various Container Types are mapped as array, can be mapped as character string so for the business object for preservation state and page frame stream conversation information under normal circumstances.
The serializing form of fundamental type for definition as shown in table 1 below, in actual applications, the mode shown in can according to the form below 1 is shone upon or changes:
Type Serializing form Explanation
String The character string of String to representative
Integer/lint-long integer The character string that 16 systems represent Adopt 16 systems to represent both can reduce the size after serializing, serializing efficiently and unserializing
Other value type The character string that 16 systems represent
Date The character string that 16 systems represent Date and long equivalence
Boolean type T/F
Table 1
For complex object, except the mode of upper table 1, also need to utilize following basic separator to complete the process of serializing, shown in table 2 specific as follows:
Separator Title Usage
Word separator Separate different words, for example different attribute-name, different value
Line Separator For array type, separate different objects, form object array
{} Level separator For multiplet, { } represents one deck wherein, its object
data structure also can be described in the same way
$ object structure-value separator in the situation that object structure can produce ambiguity, increase this descriptor and carry out disambiguation
% escape character according to certain escape rule, change.
Table 2
With concrete serializing example, describe the object structure (by the composite object structure of pseudo-representation) being first defined as follows below:
class?obj1
{
String?a;
Date?d;
}
class?obj2
{
String?b;
obj1[]c;
}
class?obj3
{
String?f;
obj2?o;
}
Then the structure based on above, carries out assignment to it, shows business object as follows:
F=test1//here " test1 " is defined as arbitrary character string, as follows with
O is object obj2, and it is defined as follows:
o.b=test2;
The length of o.c is 2, wherein c[0] and c[1] be defined as follows respectively:
c[0].a=utest1
C[0] .d=2009-4-28 (being defined as the date, lower same)
c[1].a=utest2
c[1].d=2009-4-29
After above-mentioned assignment, as shown in Figure 2, in Fig. 2: obj3, obj2 and obj1 are nest relations, its level of nesting is more inward just darker for the nested structure of indicated business object in this example; Leaf node on test1, test2, utest1, utest2,2009-4-28 and 2009-4-29 position representative object tree, this business object structure can be used object diagram navigation language OGNL (Object-Graph NavigationLanguage) expression formula to be expressed as follows:
f=test1
o.b=test2
o.c[0].a=utest1
o.c[0].d=2009-4-28
o.c[1].a=utest2
o.c[1].d=2009-4-29
Then on the basis of above-mentioned expression formula, by the serializing mode described in the present embodiment 1, above-mentioned business object is carried out to serializing, finally forms following form:
f{test1},o{b{test2},c{{a{utest1},d{2009-4-28}};{a{utest2},d{2009-4-29}}}}}
By above-mentioned mode, just can complete the serializing process of page frame stream conversation information, and then proceed follow-up operation.
Step 12: the character string after serializing is output as to page parameter preset in described client.
In this step 12, after page frame stream conversation information sequence is changed into character string, just this character string can be output as to page parameter preset in described client.Here, in described client preset page parameter can be in the list of client end interface, set in advance for preserving the variable of session information, in specific implementation process, can in the list of client end interface, increase a tag flag parameters, utilize this flag parameters to carry out the page session information after saving sequence.
By the operation of above-mentioned steps, just the page frame stream conversation information of establishment can be kept in the page of client, thereby reduce the memory cost of server, guaranteed the stable operation of server.
In addition, when client is in follow-up page operation, while carrying out various user's input operation by described processing page, this preset page parameter can be submitted in server end; Then this server end is according to obtained preset page parameter, rebuild page frame stream conversation information, then according to the concrete operations of client, described page frame stream conversation information is carried out to corresponding retouching operation, such as memory attribute data, revise some original data or delete the operation such as session data of prior partial; Then, then this amended page frame stream conversation information sequence is turned to new character string, and this new character string is output as to described preset page parameter again preserves.
When client ongoing operation, can repeat above-mentioned operating procedure, until page operation finishes; When the Business Processing of client finishes, when this client is opened the processing page of new business, above-mentionedly be kept at page parameter preset in client and will be cleared, and carry out the handling process of new business, be about to the page frame stream conversation information that new business produces and carry out serializing and preservation.
For instance, be illustrated in figure 3 client and server end and carry out mutual schematic diagram, in figure: client, when business starts, submits to empty page frame stream conversation information Context to server end; The information that server end is preserved needs is saved in this page frame stream conversation information Context, and transfers back in client; Client turns to character string by this page frame stream conversation information sequence, and is output as the preset parameter of the page and preserves.
When client is proceeded operation, while submitting new request content to, the page preset parameter of preservation is reported to server end with together with new request content, by server end, according to the page preset parameter of this preservation, rebuild page frame stream conversation information, and according to new request content, the page frame stream conversation information of rebuilding is modified, then amended page frame stream conversation information is returned to client again; This client turns to character string by amended page frame stream conversation information sequence again, then is output as the preset parameter of the page and re-starts preservation; Before service ending, continue above-mentioned operating process, until business operation finishes, being now kept at page parameter preset in client will be cleared, and waits for that operation next time starts.
In addition, because page frame stream conversation information is kept in client, in order to guarantee safety, need to there is protection mechanism to prevent that serializing is not forged and distorts to the data of client.Specifically, described character string can be adopted Message Digest 5 generate Hash Hash code, and adopt cryptographic algorithm to be encrypted described character string, the key of described encryption use is generated according to the rule pre-establishing by server end temporarily.Like this; even if other users have known relevant algorithm; when owing to not knowing key; even if adopt the way of revising ciphertext to be also easy to be detected; i.e. Hash check code mistake after deciphering; by above-mentioned protection mechanism, just can solve safety issue, prevent distorting and illegally obtaining data.
In addition, in the technical scheme of the embodiment of the present invention 1, because page frame stream conversation information is all kept in customer terminal webpage, like this when server end collapses, just page parameter preset in client and described processing page can be submitted in other new server ends, by this new server, bring in reconstruction page frame stream conversation information, so just can keep not losing of session information, thereby realized any station server when collapse in juxtaposition cluster, user's session and service conversation information can Autonomic Migration Framework arrive other server, and then the continuation that can not have influence on user operates, improved user perceptibility.
Embodiment 2: the specific embodiment of the invention 2 provides a kind of save set of page frame stream conversation information, is illustrated in figure 4 the structural representation of 2 generators of the present embodiment, and described device comprises serializing unit 41 and parameter storage unit 42, wherein:
Described serializing unit 41 is for when client operates the processing page of business, and the page frame stream conversation information sequence that server end is created turns to character string.Specifically carrying out the mode of serializing sees described in above embodiment of the method 1.
Described parameter storage unit 42 is for being output as the page parameter preset in described client by the character string after 41 serializings of described serializing unit.
In addition, in the above device, also can comprise parameter set unit 43, this parameter set unit 43 is for setting in advance the variable for preserving session information at the list of described client end interface.
In the above device, also can comprise character string ciphering unit 44, this character string ciphering unit 44 is for adopting the character string after 41 serializings of described serializing unit Message Digest 5 to generate Hash Hash code, and adopting cryptographic algorithm to be encrypted described character string, the key of described encryption use is generated according to the rule pre-establishing by server end temporarily.
The above device can integratedly be arranged in client; Also can be arranged to independent functional entity, and client maintains the connection.
It should be noted that what unit included in said apparatus embodiment was just divided according to function logic, but be not limited to above-mentioned division, as long as can realize corresponding function; In addition, the concrete title of each functional unit also, just for the ease of mutual differentiation, is not limited to protection scope of the present invention.
In addition, one of ordinary skill in the art will appreciate that all or part of step realizing in above-described embodiment method is can carry out the hardware that instruction is relevant by program to complete, corresponding program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be read-only memory, disk or CD etc.
In sum, the specific embodiment of the invention can make page frame stream conversation information be kept in the page of client, thereby has reduced the memory cost of server, has guaranteed the stable operation of server; When server failure, can on other server, rebuild session information, thereby guarantee greatly the reliability service of application program simultaneously.
The above; it is only preferably embodiment of the present invention; but protection scope of the present invention is not limited to this; any be familiar with those skilled in the art the embodiment of the present invention disclose technical scope in; the variation that can expect easily or replacement, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.

Claims (10)

1. a store method for page frame stream conversation information, is characterized in that,
When client operates the processing page of business, the page frame stream conversation information sequence that server end is created turns to character string;
Character string after serializing is output as to page parameter preset in described client, and the page frame stream conversation information that described server end is created is kept in the page of client;
Described method also comprises:
When described client is carried out various user's input operation by described processing page, described preset page parameter is submitted to server end;
Described server end, according to obtained preset page parameter, is rebuild described page frame stream conversation information, and described page frame stream conversation information is carried out to corresponding retouching operation;
Amended page frame stream conversation information sequence is turned to new character string, and this new character string is output as to described preset page parameter again, and described amended page frame stream conversation information is kept in the page of client.
2. the method for claim 1, is characterized in that, the described page frame stream conversation information sequence that server end is created turns to character string, specifically comprises:
The page frame stream conversation information that server end is created is encoded to the form based on key-value pair, and the stack of object data form, makes this page frame stream conversation information sequence turn to character string.
3. method as claimed in claim 2, is characterized in that, described object data adopts nested layer by layer relation to superpose.
4. the method for claim 1, is characterized in that, preset page parameter in described client, specifically comprises:
In the list of described client end interface, set in advance for preserving the variable of session information.
5. the method for claim 1, is characterized in that, described method also comprises:
When described Business Processing finishes, when described client is opened the processing page of new business, be kept at page parameter preset in client and be cleared.
6. the method for claim 1, is characterized in that, after the page frame stream conversation information sequence that server end is created turns to character string, described method also comprises:
Adopt Message Digest 5 to generate Hash Hash code described character string, and adopt cryptographic algorithm to be encrypted described character string, the key of described encryption use is generated according to the rule pre-establishing by server end temporarily.
7. the method for claim 1, is characterized in that, described method also comprises:
When described server end collapse, page parameter preset in described client and described processing page are submitted to new server end, by described new server, bring in reconstruction page frame stream conversation information.
8. a save set for page frame stream conversation information, is characterized in that, comprising:
Serializing unit, for when client operates the processing page of business, the page frame stream conversation information sequence that server end is created turns to character string;
Parameter storage unit, for the character string after described serializing unit sequence is output as to the page parameter preset in described client, and the page frame stream conversation information that described server end is created is kept in the page of client;
Wherein, when described client is carried out various user's input operation by described processing page, described save set is submitted to server end by described preset page parameter; Described server end, according to obtained preset page parameter, is rebuild described page frame stream conversation information, and described page frame stream conversation information is carried out to corresponding retouching operation; Described save set further turns to new character string by amended page frame stream conversation information sequence, and this new character string is output as to described preset page parameter again, and described amended page frame stream conversation information is kept in the page of client.
9. device as claimed in claim 8, is characterized in that, described device also comprises:
Parameter set unit, for setting in advance the variable for preserving session information at the list of described client end interface.
10. install as claimed in claim 8 or 9, it is characterized in that, described device also comprises:
Character string ciphering unit, for the character string after described serializing unit sequence being adopted Message Digest 5 generate Hash Hash code, and adopting cryptographic algorithm to be encrypted described character string, the key of described encryption use is generated according to the rule pre-establishing by server end temporarily.
CN200910137698.0A 2009-05-07 2009-05-07 Storage method and device of page frame stream conversation information Active CN101883130B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910137698.0A CN101883130B (en) 2009-05-07 2009-05-07 Storage method and device of page frame stream conversation information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910137698.0A CN101883130B (en) 2009-05-07 2009-05-07 Storage method and device of page frame stream conversation information

Publications (2)

Publication Number Publication Date
CN101883130A CN101883130A (en) 2010-11-10
CN101883130B true CN101883130B (en) 2014-05-07

Family

ID=43055014

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910137698.0A Active CN101883130B (en) 2009-05-07 2009-05-07 Storage method and device of page frame stream conversation information

Country Status (1)

Country Link
CN (1) CN101883130B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106326377A (en) * 2016-08-15 2017-01-11 东软集团股份有限公司 Serialization method and device, deserialization method and device, and system
CN107315539B (en) * 2017-05-12 2020-08-04 武汉斗鱼网络科技有限公司 Data storage method and data extraction method

Also Published As

Publication number Publication date
CN101883130A (en) 2010-11-10

Similar Documents

Publication Publication Date Title
CN108536761B (en) Report data query method and server
US8812683B2 (en) Service scripting framework
CN108363564A (en) Entry modularization implementation method, device, terminal device and storage medium
CN101098248A (en) Method and system for implementing universal network management based on configuration describing document
US8108768B2 (en) Improving efficiency of content rule checking in a content management system
US20170351506A1 (en) Automating feature graduation
US11301539B2 (en) Just-in-time front end template generation using logical document object models
CN107861736A (en) Patch generates and update method and device, electronic equipment, storage medium
CN104750472A (en) Resource bundle management method and device of terminal application
US9971794B2 (en) Converting data objects from multi- to single-source database environment
CN107357588B (en) Object code generation method and device
US11360966B2 (en) Information processing system and method of controlling information processing system
CN111435367A (en) Knowledge graph construction method, system, equipment and storage medium
CN107977344A (en) Date storage method, acquisition methods and server
CN111143383A (en) Data updating method and device, electronic equipment and storage medium
CN101883130B (en) Storage method and device of page frame stream conversation information
US11018938B1 (en) Auditing metadata representation of a cloud-computing platform based datacenter
CN106990974A (en) A kind of APP applications update method, device and electronic equipment
US20110153836A1 (en) Dynamic attributes for mobile business objects
CN105677579A (en) Data access method and system in cache system
CN108052294B (en) Modification writing method and modification writing system of distributed storage system
CN102799423A (en) Method and device for implementing dynamic method in JSF (java service face)
CN104598554A (en) Webpage page loading method and device
US8656410B1 (en) Conversion of lightweight object to a heavyweight object
CN104808970A (en) Method and system for realizing internationalized software

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant