CN102510377A - Webpage interaction accelerating asynchronous data processing method and system - Google Patents

Webpage interaction accelerating asynchronous data processing method and system Download PDF

Info

Publication number
CN102510377A
CN102510377A CN2011103380865A CN201110338086A CN102510377A CN 102510377 A CN102510377 A CN 102510377A CN 2011103380865 A CN2011103380865 A CN 2011103380865A CN 201110338086 A CN201110338086 A CN 201110338086A CN 102510377 A CN102510377 A CN 102510377A
Authority
CN
China
Prior art keywords
data processing
asynchronous data
template
client
data
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.)
Pending
Application number
CN2011103380865A
Other languages
Chinese (zh)
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.)
Beijing Ruian Technology Co Ltd
Original Assignee
Beijing Ruian Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Ruian Technology Co Ltd filed Critical Beijing Ruian Technology Co Ltd
Priority to CN2011103380865A priority Critical patent/CN102510377A/en
Publication of CN102510377A publication Critical patent/CN102510377A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a webpage interaction accelerating asynchronous data processing method and a system. The method comprises the following steps: 1) an asynchronous data request is sent to a server side by a client; 2) corresponding asynchronous data is encapsulated by the server side according to the request; 3) the encapsulated asynchronous data and predefined templates are sent to a data processing engine by the server side; 4) the asynchronous data is processed by the data processing engine based on the templates to generate character strings to be returned to the client; and 5) the returned character strings are received by the client and are written in an assigned position of a page. The system comprises the client, the server side and the data processing engine. The method and the system disclosed by the invention can be used for the presentation layer of any web system to separate the presentation layer and a business logic layer completely, and with the method, a developer does not need to write codes for return value resolution, so the development efficiency is improved; and the received data can be directly written into the page by the client, so the display speed is improved, and user experiences are enhanced.

Description

Asynchronous data processing method and system that a kind of acceleration of web page is mutual
Technical field
The invention belongs to the web application, be specifically related to a kind of acceleration of web page mutual asynchronous data processing method and system.
Background technology
In the webpage asynchronous interactive of routine is used; Its basic principle is exactly that the user end to server end sends an asynchronous request; Server end calls method for processing business, and treated data are returned to client, through javascipt and css the page is upgraded then; To be implemented in the purpose of update displayed content under the situation that the page do not refresh, better improved user experience.
In the process of existing method, trouble is exactly the data content that the returns parsing problem at the page relatively.For being simple return type, for example numeral or character string, return string just can achieve the goal.But when the data structure more complicated returned; The assignment as a result of using character string to return just need to write more script method to be used to split character string and will splitting arrives corresponding position; This way has not only strengthened the workload of program development, has increased the weight of the burden of browser resolves javascript code simultaneously; And can make code ugly, be difficult to safeguard.Can be a little better if use xml or json form to return, but such data structure still needs certain dissection process at front end, does not effectively deal with problems.
Summary of the invention
To the problems of the prior art; The purpose of this invention is to provide a kind of data processing method; Utilize the template that has defined, the data of client-requested are played up, the template data that will play up then directly writes back to client; Effectively reduce the size of code that the page is resolved, improved the analysis feature and the maintainability of data.
The present invention provides a kind of acceleration of web page mutual asynchronous data processing method, and step is following:
1) the user end to server end sends the asynchronous data request;
2) after server end receives request, corresponding asynchronous data is encapsulated;
3) server end will send to the data processing engine through the asynchronous data and the predefined template of encapsulation;
4) the data processing engine is handled asynchronous data based on template, generates the character string that web browser can directly show processing, and character string is returned to client;
5) client receives the character string of returning, and it is write page assigned address, realizes that the part of the page is refreshed.
Said server end is an object with data encapsulation.
Said template is to have the set form and the fixing document of grammer, and wherein the content of placeholder sign can be by dynamic data replacement.
Said placeholder is the character string that spcial character begins and ends up, and middle content is the content of placeholder sign.
Said template is by pseudo-html language generation, and its layout format adopts the XML format specification.
Template: portion has been finished writing substance, and set form, the fixing document of grammer are arranged, and wherein with the content of placeholder sign, is filled by the user, and the data that different users provides are different.Placeholder in template when template is moved, is resolved template by the data processing engine, and adopts the content of dynamic data replacement placeholder part.
The said the 4th) concrete grammar of step is:
A, data processing engine read template;
B, template is loaded in the internal memory with textual form;
C, the template text resolution that will be loaded in the internal memory are the text of html code, and when in resolving, running into the placeholder of template, the content that placeholder is identified replaces with the data through encapsulation.
D, will to resolve the text-converted that generates be character string.
Core Feature of the present invention and business are all accomplished by the data processing engine.What the developer need do only is the request msg that receives the user, carries out data encapsulation according to service needed, and writes simple template according to the form that represents of business need.Then data and template are submitted to the data processing engine simultaneously.At last, receive the data that engine returns, and it is write page assigned address get final product.In this process, the developer only need pay close attention to representing of professional and the page, and does not need to write processing method for the energy of the parsing labor of complicated return value behind the asynchronous call again.And client promptly can be used for showing after receiving data, has improved display speed, has strengthened user experience.
Data processing engine:, generate text output based on template with the data processing class of java language.
The present invention also provides a kind of acceleration of web page mutual asynchronous data treatment system; Comprise client, server end and data processing engine; Client is sent the asynchronous data request and is given server end; Server end sends to the data processing engine according to request with corresponding asynchronous data and template, and the data processing engine is handled asynchronous data and generated character string based on template and sends to client.
Said server end is provided with receiver module and data encapsulation module, and receiver module receives the request of client, and the data encapsulation module is encapsulated as object with asynchronous data.
Advantage of the present invention is following:
1. the present invention and Web container are irrelevant, and the presentation layer that can be used for any web system is realized, thoroughly separates presentation layer and Business Logic.
2. the developer only need pay close attention to representing of professional and the page, need not resolve for return value and write code, has improved development efficiency.
3. client receives that the return data page that can write direct shows, has improved display speed, has strengthened user experience.
Description of drawings
Accompanying drawing is a data processing method flow chart of the present invention.
Embodiment
The asynchronous data treatment system that acceleration of web page of the present invention is mutual; Comprise client, server end and data processing engine; Client is sent the asynchronous data request and is given server end; Server end sends to the data processing engine according to request with corresponding asynchronous data and template, and the data processing engine is handled asynchronous data and generated character string based on template and sends to client.
Said server end is provided with receiver module and data encapsulation module, and receiver module receives the request of client, and the data encapsulation module is encapsulated as object with asynchronous data.
Below in conjunction with accompanying drawing, detailed explanation system of the present invention utilizes template to handle the flow process of asynchronous call return value.
Data processing method of the present invention, as shown in the figure:
1. client is sent the asynchronous data request.
2. server end calls receiver module and receives client-requested, calls the data encapsulation module according to the parameter value in the request, and the data encapsulation that needs is returned to client becomes object, and this object can be any form, like List, and Map, Object etc.Behind the formation object, object is submitted to the data processing engine.
3. the data processing engine, is resolved template with the rule of agreement through reading template file.Its basic principle is following:
At first, template is loaded in the internal memory with textual form.If load successfully, then carry out following flow process; Otherwise get into the fault processing module, return miscue information to client, flow process finishes.
The definition grammer of template is a kind of pseudo-html language, and its layout format copies static page to realize.Require it to strictly observe the XML format specification, through the definition realization page layout of rules such as father node, child node, the brother of node.Under the situation that label name does not conflict, the most of basic label in can multiplexing html needs the data converted amount when having reduced parsing like this.According to its internodal relation, generate the html code of corresponding logical relationship during parsing.For the content of need be in template resolving coming dynamic replacement, use the placeholder sign with asynchronous data.Placeholder is supported different asynchronous data types, like integer, character string, set, Hash table etc.; The user also can be according to the existing placeholder classification of service needed expansion, to adapt to the self-defining data type.
In template resolving,,, from the object that imports into, extract the object properties value of same names and carry out the content replacement then according to its unique identification if run into placeholder.The method is utilized the principle towards page program, and replacement work runs through the overall process that template is resolved all the time.After template resolve to be accomplished, corresponding placeholder replaced with client the what be new that will represent, flow chart of data processing finishes simultaneously.
At last, the text that the data processing engine is generated returns client with the form of character string, and it is write page assigned address.
Although disclose specific embodiment of the present invention and accompanying drawing for the purpose of illustration; Its purpose is to help to understand content of the present invention and implement according to this; But it will be appreciated by those skilled in the art that: in the spirit and scope that do not break away from the present invention and appended claim, various replacements, variation and modification all are possible.The present invention should not be limited to this specification most preferred embodiment and the disclosed content of accompanying drawing, and the scope that the present invention requires to protect is as the criterion with the scope that claims define.

Claims (10)

1. the asynchronous data processing method that acceleration of web page is mutual comprises the steps:
1) the user end to server end sends the asynchronous data request;
2) server end is according to the corresponding asynchronous data of request encapsulation;
3) server end will send to the data processing engine through the asynchronous data and the predefined template of encapsulation;
4) the data processing engine is handled asynchronous data based on template, generates character string and returns client;
5) client receives the character string of returning, and it is write page assigned address.
2. the asynchronous data processing method that acceleration of web page according to claim 1 is mutual is characterized in that said server end is an object with data encapsulation.
3. the asynchronous data processing method that acceleration of web page according to claim 1 is mutual is characterized in that said template is to have the set form and the fixing document of grammer, and wherein the content of placeholder sign can be by dynamic data replacement.
4. the asynchronous data processing method that acceleration of web page according to claim 3 is mutual is characterized in that said placeholder is the character string that spcial character begins and ends up, and middle content is the content of placeholder sign.
5. the asynchronous data processing method that acceleration of web page according to claim 1 is mutual is characterized in that said template is by pseudo-html language generation, and its layout format adopts the XML format specification.
6. the asynchronous data processing method that acceleration of web page according to claim 3 is mutual is characterized in that the said the 4th) the step method of resolving asynchronous data does;
A, data processing engine read template;
B, template is loaded in the internal memory;
C, will be loaded into the text that template in the internal memory resolves to the html code, when in resolving, running into the placeholder of template, the content of placeholder sign replaced with the data through encapsulation;
D, will to resolve the text-converted that generates be character string.
7. the asynchronous data processing method that acceleration of web page according to claim 6 is mutual, the method that it is characterized in that resolving template generates the html code of corresponding logical relationship for according to each internodal relation in the template.
8. the asynchronous data processing method that acceleration of web page according to claim 6 is mutual is characterized in that the data that encapsulate are object.
9. the asynchronous data processing method that acceleration of web page according to claim 7 is mutual is characterized in that according to the placeholder sign, from object, extracts the content of the object properties replacement placeholder sign identical with the sign title.
10. asynchronous data treatment system that acceleration of web page is mutual; It is characterized in that comprising client, server end and data processing engine; Client is sent the asynchronous data request and is given server end; Server end is provided with receiver module and data encapsulation module, and receiver module receives request, and server end calls the data encapsulation module corresponding asynchronous data is encapsulated as object; And template and object sent to the data processing engine, the data processing engine is handled asynchronous data and is generated character string based on template and sends to client.
CN2011103380865A 2011-10-31 2011-10-31 Webpage interaction accelerating asynchronous data processing method and system Pending CN102510377A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011103380865A CN102510377A (en) 2011-10-31 2011-10-31 Webpage interaction accelerating asynchronous data processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011103380865A CN102510377A (en) 2011-10-31 2011-10-31 Webpage interaction accelerating asynchronous data processing method and system

Publications (1)

Publication Number Publication Date
CN102510377A true CN102510377A (en) 2012-06-20

Family

ID=46222430

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103380865A Pending CN102510377A (en) 2011-10-31 2011-10-31 Webpage interaction accelerating asynchronous data processing method and system

Country Status (1)

Country Link
CN (1) CN102510377A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778117A (en) * 2012-10-17 2014-05-07 腾讯科技(深圳)有限公司 Mobile terminal message loading method and system
CN105007309A (en) * 2015-06-29 2015-10-28 上海瀚之友信息技术服务有限公司 System and method for separately controlling dynamic data and static interface
CN105005568A (en) * 2014-04-22 2015-10-28 中国银联股份有限公司 Front-end processing device and method of web page on the basis of template
CN105516333A (en) * 2015-12-23 2016-04-20 北京奇虎科技有限公司 Interactive method and system based on webpage
CN107172012A (en) * 2017-04-18 2017-09-15 北京思特奇信息技术股份有限公司 A kind of message format conversion method and system
CN107633063A (en) * 2017-09-20 2018-01-26 福建四创软件有限公司 A kind of flood control data second level loading method based on background server
WO2018049869A1 (en) * 2016-09-19 2018-03-22 华为技术有限公司 Device and method for displaying extension point in page
CN108874875A (en) * 2018-04-28 2018-11-23 北京微播视界科技有限公司 The asynchronous loading method of web page contents, device, readable storage medium storing program for executing and terminal
CN109710250A (en) * 2018-11-15 2019-05-03 安徽同徽信息技术有限公司 It is a kind of for constructing the visualization engine system and method for user interface
CN112185522A (en) * 2020-09-27 2021-01-05 上海联影医疗科技股份有限公司 Information processing method and device and terminal
WO2023165190A1 (en) * 2022-03-01 2023-09-07 腾讯科技(深圳)有限公司 Data processing method and apparatus, program product, computer device, and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1555534A (en) * 2001-09-13 2004-12-15 �Ҵ���˾ Method and system for delivering dynamic information in a network
CN1614927A (en) * 2004-11-18 2005-05-11 北京锐安科技有限公司 Method for realizing tree-shaped structure in B/S structure
CN101079041A (en) * 2006-12-29 2007-11-28 腾讯科技(深圳)有限公司 Dynamic web page updating method and system
CN100437579C (en) * 2005-12-20 2008-11-26 腾讯科技(深圳)有限公司 Method for realizing AJAX webpage
CN101976235A (en) * 2010-09-21 2011-02-16 天津神舟通用数据技术有限公司 Extensible Word report automatically-generating method based on dynamic web page

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1555534A (en) * 2001-09-13 2004-12-15 �Ҵ���˾ Method and system for delivering dynamic information in a network
CN1614927A (en) * 2004-11-18 2005-05-11 北京锐安科技有限公司 Method for realizing tree-shaped structure in B/S structure
CN100437579C (en) * 2005-12-20 2008-11-26 腾讯科技(深圳)有限公司 Method for realizing AJAX webpage
CN101079041A (en) * 2006-12-29 2007-11-28 腾讯科技(深圳)有限公司 Dynamic web page updating method and system
CN101976235A (en) * 2010-09-21 2011-02-16 天津神舟通用数据技术有限公司 Extensible Word report automatically-generating method based on dynamic web page

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778117B (en) * 2012-10-17 2018-11-09 腾讯科技(深圳)有限公司 A kind of method and system of information of mobile terminal load
CN103778117A (en) * 2012-10-17 2014-05-07 腾讯科技(深圳)有限公司 Mobile terminal message loading method and system
CN105005568A (en) * 2014-04-22 2015-10-28 中国银联股份有限公司 Front-end processing device and method of web page on the basis of template
CN105005568B (en) * 2014-04-22 2019-10-01 中国银联股份有限公司 Web page front end processing device and method based on template
CN105007309A (en) * 2015-06-29 2015-10-28 上海瀚之友信息技术服务有限公司 System and method for separately controlling dynamic data and static interface
CN105516333A (en) * 2015-12-23 2016-04-20 北京奇虎科技有限公司 Interactive method and system based on webpage
CN105516333B (en) * 2015-12-23 2018-10-23 北京奇虎科技有限公司 A kind of web-based exchange method and system
WO2018049869A1 (en) * 2016-09-19 2018-03-22 华为技术有限公司 Device and method for displaying extension point in page
CN107172012A (en) * 2017-04-18 2017-09-15 北京思特奇信息技术股份有限公司 A kind of message format conversion method and system
CN107633063A (en) * 2017-09-20 2018-01-26 福建四创软件有限公司 A kind of flood control data second level loading method based on background server
CN107633063B (en) * 2017-09-20 2021-04-27 四创科技有限公司 Flood prevention data second-level loading method based on background server
CN108874875A (en) * 2018-04-28 2018-11-23 北京微播视界科技有限公司 The asynchronous loading method of web page contents, device, readable storage medium storing program for executing and terminal
CN109710250A (en) * 2018-11-15 2019-05-03 安徽同徽信息技术有限公司 It is a kind of for constructing the visualization engine system and method for user interface
CN109710250B (en) * 2018-11-15 2022-05-31 安徽同徽信息技术有限公司 Visualization engine system and method for constructing user interface
CN112185522A (en) * 2020-09-27 2021-01-05 上海联影医疗科技股份有限公司 Information processing method and device and terminal
WO2023165190A1 (en) * 2022-03-01 2023-09-07 腾讯科技(深圳)有限公司 Data processing method and apparatus, program product, computer device, and medium

Similar Documents

Publication Publication Date Title
CN102510377A (en) Webpage interaction accelerating asynchronous data processing method and system
CN104461484B (en) The implementation method and device of front-end template
JP6629848B2 (en) Page processing for mobile applications
CN101706821B (en) Tag-based mobile internet page design system and method
CN110020307A (en) A kind of method for drafting and device of client's end-view
CN105373615A (en) Page customization method and device
CN104714982A (en) Method and system for loading webpage
CN101154157A (en) System and method for providing globalization function to application of JavaScript
CN106293675B (en) System static resource loading method and device
CN101714133A (en) WEB-based mathematical formula editing system and method
CN109032917B (en) Page debugging method and system, mobile terminal and computer terminal
CN106897251B (en) Rich text display method and device
CN103309806B (en) The device and method of a kind of quick development and testing
CN102184101B (en) Software application frame and development system thereof for smartphones
CN106372130B (en) A kind of static resource management method
CN103488732A (en) Generation method and device of static pages
Hales HTML5 and JavaScript Web Apps: Bridging the gap between the web and the mobile web
CN104063401A (en) Webpage style address merging method and device
CN103176778B (en) Web development methods and device
CN102385580A (en) Method and device for customizing webpage contents
CN102622448A (en) Digital television interactive application page markup language resolving method
CN102999579A (en) Browser for processing page textbox, and method for processing page textbox element
CN101860734A (en) Method for implementing incremental transmission and display of dynamic images through AJAX
CN103377039A (en) Webgame developing and analyzing method, editor and analyzer
CN105989126B (en) A kind of Webpage display process and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120620