CN105335523A - Data interaction method and Web server - Google Patents

Data interaction method and Web server Download PDF

Info

Publication number
CN105335523A
CN105335523A CN201510863335.0A CN201510863335A CN105335523A CN 105335523 A CN105335523 A CN 105335523A CN 201510863335 A CN201510863335 A CN 201510863335A CN 105335523 A CN105335523 A CN 105335523A
Authority
CN
China
Prior art keywords
data
interaction form
data interaction
web server
request information
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
CN201510863335.0A
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.)
SHENZHEN DATA FAULT TOLERANCE SYSTEM CO Ltd
Original Assignee
SHENZHEN DATA FAULT TOLERANCE SYSTEM 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 SHENZHEN DATA FAULT TOLERANCE SYSTEM CO Ltd filed Critical SHENZHEN DATA FAULT TOLERANCE SYSTEM CO Ltd
Priority to CN201510863335.0A priority Critical patent/CN105335523A/en
Publication of CN105335523A publication Critical patent/CN105335523A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/84Mapping; Conversion

Abstract

The invention discloses a data interaction method and a Web server. The method comprises the steps that a data interaction format of data needing to be requested by a data request message sent by a Web browser is determined, initial data are obtained in a data structure storing original data according to the data interaction format, multiple data interaction formats can be provided by the data structure, the Web server conducts processing on the initial data according to the data interaction format, and the processed data are fed back to the Web server. In this way, the data structure which can support multiple data interaction formats is designed, use of various data interaction formats can be effectively met, the complex improvement process is not needed, the compatibility is high, and the practicability is good.

Description

A kind of data interactive method and Web server
Technical field
The present invention relates to field field of computer technology, particularly relate to a kind of data interactive method and Web server.
Background technology
The traditional data file of robot calculator mainly carries out storing and read in binary mode, the data file of this mode must be undertaken reading and writing by specific program and revise, and therefore in data representation, extensibility, user management and Web application, has larger difficulty.Along with the development of computer technology, the application of Web is more and more extensive, because binary data file is in the weakness of the mutual of Web aspect with display, gradually replace by a kind of new technology, i.e. extend markup language (ExtensibleMarkupLanguage, XML).XML is a kind of first Markup Language, it provides a kind ofly extensively to perform and be easy to the form of description of the structured data configured, this form easy to understand and management, and structured data is separated with data representation.Therefore very flexible in application, and be easy to expansion, can the data in the numerous source of seamless integration.Nowadays this technology has been applied to multiple fields such as high-level data library searching, online quotation marks, medicine, law and ecommerce, is just playing great effect.
At present, emerging JSON (JavascriptObjectNotation) is a kind of data interchange format of lightweight, and it is easy to the reading of people and writes, and is also easy to machine simultaneously and resolves and generate.JSON adopts text formatting that is completely independent and language, but also using the custom (comprising: C, C++, C#, Java, Javascript, Perl, Python etc.) being similar to C language family.These characteristics make JSON be called the data interchange language of Web exploitation middle ideal, and it can make JavaScript read complicated data structure easily.JSON concept is simple, and the data object that namely client is directly asked by Web server generates JavaScript statement, and sends to client, and client directly obtains this data object by eval method after obtaining.
In the process using JSON form, if Software for Design is not good, then need rewrite or add a large amount of function codes, even need to add new data structure and could support JSON form on the basis of original code, therefore, data structure of the prior art is to support JSON form, and need complicated development, practicality is not strong.
Summary of the invention
The technical matters that the present invention mainly solves is to provide a kind of data interactive method and Web server, only can use single data interaction form for solving in prior art in data exchange process, the problem of user's request can not be adapted to.
For solving the problems of the technologies described above, the invention provides a kind of data interactive method, comprising:
Determine the data interaction form of the data of the required request of data request information that Web browser sends;
From the data structure that store raw data, obtain primary data according to described data interaction form, described data structure can support several data exchange format;
According to described data interaction form described primary data to be processed and by the data feedback after process to described Web browser.
Preferably, describedly according to described data interaction form described primary data processed and by the data feedback after process to described Web browser, comprising:
Described primary data is generated the data meeting described data interaction form;
By the described data feedback of described data interaction form that meets to described Web server.
Preferably, comprise before the step of the data interaction form of the data of the required request of the described data request information determining that Web server sends:
Receive the data request information that described Web browser sends, in described data request information, comprise the characteristic parameter of the data interaction form of the data of required request;
Preferably, the data interaction form of the data of the required request of the described data request information determining that Web server sends, specifically comprises:
The characteristic parameter of the several data exchange format characteristic parameter of described data interaction form and described data structure supported mates, and the data interaction form of coupling is defined as the data interaction form of the data of described required request.
Preferably, described data interchange format is XML format, JSON form or POJO form.
In order to solve the problems of the technologies described above, the invention provides a kind of Web server, comprising:
Determination module, for determining the data interaction form of the data that the data request information that Web browser sends is asked;
Acquisition module, for obtaining primary data according to described data interaction form from the data structure that store raw data, described data structure can support several data exchange format;
Processing module, for process described primary data according to described data interaction form and by the data feedback after process to described Web browser.
Preferably, processing module comprises:
Generation module, for generating the data meeting described data interaction form by described primary data;
Sending module, for giving described Web server by the described data feedback meeting described data interaction form.
Preferably, described Web server comprises:
Receiver module, for receiving the data request information that described Web browser sends, comprises the characteristic parameter of the data interaction form of the data of required request in described data request information;
Preferably, described determination module specifically for:
The characteristic parameter of the several data exchange format characteristic parameter of described data interaction form and described data structure supported mates, and the data interaction form of coupling is defined as the data interaction form of the data of described required request.
Preferably, described data interchange format is XML format, JSON form or POJO form.
The invention has the beneficial effects as follows: the situation being different from prior art, the data interaction form of the data of the required request of the data request information that Web server determination Web browser provided by the invention sends, from the data structure that store raw data, primary data is obtained according to this data interaction form, this data structure can provide several data exchange format, Web server will to process this primary data according to this data interaction form and by the data feedback after process to Web server, by designing a kind of data structure can supporting several data exchange format, effectively can meet the use of several data exchange format, and do not need the development through complexity, compatible strong, practicality is good.
Accompanying drawing explanation
Fig. 1 is a process flow diagram of data interactive method in embodiment of the present invention;
Fig. 2 is another process flow diagram of data interactive method in embodiment of the present invention;
Fig. 3 is a schematic diagram of the structure of Web server in embodiment of the present invention;
Fig. 4 is another schematic diagram of the structure of Web server in embodiment of the present invention.
Embodiment
The embodiment of the present invention provides a kind of method and Web server of data interaction, Web server in the method can support the data structure of several data exchange format by utilizing, generate the data meeting the data interaction form of the data of data request message requests, make it possible to the data of the data interaction form generating a certain type as required, compatible strong, meet the demand of various data interaction form, and do not need complicated improvement, practical.
Refer to Fig. 1, be a kind of in embodiment of the present invention embodiment of method of data interaction, comprise:
Step 101, determine the data interaction form of the data of the required request of data request information that Web browser sends;
In embodiments of the present invention, Web server can and Web browser between can carry out data interaction.Wherein, Web browser can send data request information to Web server, and Web server, after receiving this data request information, will determine the data interaction form of the data of asking required for this data request information.
Step 102, from the data structure that store raw data, obtain primary data according to data interaction form, data structure can support several data exchange format;
In embodiments of the present invention, Web server obtains primary data by according to established data exchange format from the data structure that store raw data, and this data structure can support several data exchange format.
It should be noted that, in embodiments of the present invention, it is well-designed that this can support that the data structure of several data exchange format is through, and can hold dissimilar data.And this data structure is kept at Web server.
Step 103, according to data interaction form primary data to be processed and by the data feedback after process to Web browser.
In embodiments of the present invention, Web server will to process primary data according to data interaction form and by the data feedback after process to Web browser.Such as: if established data exchange format is XML format, then primary data is generated the data meeting XML format, if established data exchange format is JSON form, then primary data is generated the data meeting JSON form, if established data exchange format is POJO form, then primary data is generated the data meeting POJO form.
In embodiments of the present invention, the data interaction form of the data of the required request of the data request information that Web server determination Web browser sends, from the data structure that store raw data, primary data is obtained according to this data interaction form, this data structure can provide several data exchange format, Web server will to process this primary data according to this data interaction form and by the data feedback after process to Web server, by designing a kind of data structure can supporting several data exchange format, effectively can meet the use of several data exchange format, and do not need the development through complexity, compatible strong.
Technical scheme for a better understanding of the present invention in embodiment, refers to Fig. 2, is the embodiment of data interactive method in the embodiment of the present invention, comprises:
The data request information that step 201, reception Web browser send, comprises the characteristic parameter of the data interaction form of the data of required request in data request information;
Step 202, the characteristic parameter of the several data exchange format characteristic parameter of data interaction form and data structure supported mate, and the data interaction form of coupling are defined as the data interaction form of the data of required request;
In embodiments of the present invention, data interaction can be carried out between Web browser and Web server, Web server can receive the data request information that Web browser sends, this data request information is for Web server request msg, and comprises the characteristic parameter of the data interaction form of the data of needs request in this data request information.
In embodiments of the present invention, the characteristic parameter of the several data exchange format that the characteristic parameter of data interaction form and data structure are supported by Web server mates, and the data interaction form of coupling is defined as the data interaction form of the data of asking required for Web browser.
In embodiments of the present invention, Web browser can pre-set, or is selected by user, or by the data interaction form of Web browser from the data of its request of main separation.
It should be noted that, the characteristic parameter of data interaction form determines concrete data interaction form for Web server.
Or, in embodiments of the present invention, the numbering of data interaction form in data request information, can also be carried, and the numbering for unique identification data exchange format that this numbering is Web server and Web browser all to be used.
In embodiments of the present invention, the process of what step 201 and step 202 described is Web server determination data interaction form, this step 201 and step 202 are refinements of middle step 101 embodiment illustrated in fig. 1.
Step 203, from the data structure that store raw data, obtain primary data according to data interaction form, data structure can support several data exchange format;
In embodiments of the present invention, Web server obtains primary data by according to established data exchange format from the data structure that store raw data, and this data structure can support several data exchange format.
It should be noted that, in embodiments of the present invention, it is well-designed that this can support that the data structure of several data exchange format is through, and can hold dissimilar data.
Step 204, primary data generated meet the data of data interaction form;
Step 205, will the data feedback of data interaction form be met to Web server.
Web server is after obtaining primary data in embodiments of the present invention, this primary data is generated the data meeting established data exchange format, and will meet the data feedback of data interaction form to Web server.
In embodiments of the present invention, Web server receives the data request information that Web browser sends, the characteristic parameter of the data interaction form of the data of required request is comprised in this data request information, and the characteristic parameter of the several data exchange format characteristic parameter of this data interaction form and data structure supported mates, the data interaction form of coupling is defined as the data interaction form of the data of required request, and from the data structure that store raw data, obtain primary data according to data interaction form, this data structure supports several data exchange format, primary data is generated the data meeting data interaction form by Web server, and will the data feedback of data interaction form be met to Web server.By using the data structure can supporting several data exchange format, the data interaction form making it possible to ask according to data request information generates corresponding data, compatible strong, and does not need too complicated operation, practical.
Refer to Fig. 3, be a kind of in embodiment of the present invention embodiment of structure of Web server, comprise, comprising:
Determination module 301, for determining the data interaction form of the data that the data request information that Web browser sends is asked;
Acquisition module 302, for obtaining primary data according to this data interaction form from the data structure that store raw data, this data structure can support several data exchange format;
Processing module 303, for process this primary data according to this data interaction form and by the data feedback after process to this Web browser.
In embodiments of the present invention, determination module 301 determines the data interaction form of the data of the required request of data request information that Web browser sends, then from the data structure that store raw data, obtain primary data according to this data interaction form by acquisition module 302, this data structure can support several data exchange format; Finally, processing module 303 to process this primary data according to this data interaction form and by the data feedback after process to this Web browser.
In embodiments of the present invention, the data interaction form of the data of the required request of the data request information that Web server determination Web browser sends, from the data structure that store raw data, primary data is obtained according to this data interaction form, this data structure can provide several data exchange format, Web server will to process this primary data according to this data interaction form and by the data feedback after process to Web server, by designing a kind of data structure can supporting several data exchange format, effectively can meet the use of several data exchange format, and do not need the development through complexity, compatible strong.
The structure of the Web server for a better understanding of the present invention in embodiment, refer to Fig. 4, for the embodiment of the structure of Web server in the embodiment of the present invention, comprise the determination module 301, acquisition module 302 and the processing module 303 that describe in embodiment as shown in Figure 3, and similar to the content of middle description embodiment illustrated in fig. 3, do not repeat herein.
In this inventive embodiments, processing module 303 comprises:
Generation module 401, for generating the data meeting this data interaction form by this primary data;
Sending module 402, for meeting the data feedback of this data interaction form to this Web server by this.
In embodiments of the present invention, this Web server comprises:
Receiver module 403, for receiving the data request information that this Web browser sends, comprises the characteristic parameter of the data interaction form of the data of required request in this data request information;
In embodiments of the present invention, this determination module 301 specifically for:
The characteristic parameter of the several data exchange format characteristic parameter of this data interaction form and this data structure supported mates, and the data interaction form of coupling is defined as the data interaction form of the data of this required request.
In embodiments of the present invention, this data interchange format is XML format, JSON form or POJO form.
In embodiments of the present invention, receiver module 403 receives the data request information that Web server sends, the characteristic parameter of the data interaction form of the data of required request is comprised in this data request information, then the characteristic parameter of several data exchange format that the characteristic parameter of this data interaction form and its data structure are supported by determination module 301 mates, the data interaction form of coupling is determined the exchange format of the data of this required request, then from the data structure that store raw data, primary data is obtained according to this data interaction form by acquisition module 302, this data structure can support several data exchange format, finally, this primary data is generated the data meeting this data interaction form by the generation module 401 in processing module 303, and by sending module 402, this is met the data feedback of this data interaction form to Web browser, to complete the data interaction between Web server and Web browser.
In embodiments of the present invention, Web server receives the data request information that Web browser sends, the characteristic parameter of the data interaction form of the data of required request is comprised in this data request information, and the characteristic parameter of the several data exchange format characteristic parameter of this data interaction form and data structure supported mates, the data interaction form of coupling is defined as the data interaction form of the data of required request, and from the data structure that store raw data, obtain primary data according to data interaction form, this data structure supports several data exchange format, primary data is generated the data meeting data interaction form by Web server, and will the data feedback of data interaction form be met to Web server.By using the data structure can supporting several data exchange format, the data interaction form making it possible to ask according to data request information generates corresponding data, compatible strong, and does not need too complicated operation, practical.
The foregoing is only embodiments of the present invention; not thereby the scope of the claims of the present invention is limited; every utilize instructions of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.

Claims (10)

1. a data interactive method, is characterized in that, comprising:
Determine the data interaction form of the data of the required request of data request information that Web browser sends;
From the data structure that store raw data, obtain primary data according to described data interaction form, described data structure can support several data exchange format;
According to described data interaction form described primary data to be processed and by the data feedback after process to described Web browser.
2. the method according to right 1, is characterized in that, describedly to process described primary data according to described data interaction form and by the data feedback after process to described Web browser, comprising:
Described primary data is generated the data meeting described data interaction form;
By the described data feedback of described data interaction form that meets to described Web server.
3. method according to claim 1, is characterized in that, comprises before the step of the data interaction form of the data of the required request of the described data request information determining that Web server sends:
Receive the data request information that described Web browser sends, in described data request information, comprise the characteristic parameter of the data interaction form of the data of required request.
4. method according to claim 3, is characterized in that, the data interaction form of the data of the required request of the described data request information determining that Web server sends, specifically comprises:
The characteristic parameter of the several data exchange format characteristic parameter of described data interaction form and described data structure supported mates, and the data interaction form of coupling is defined as the data interaction form of the data of described required request.
5. the method according to Claims 1-4 any one, is characterized in that, described data interchange format is XML format, JSON form or POJO form.
6. a Web server, is characterized in that, comprising:
Determination module, for determining the data interaction form of the data that the data request information that Web browser sends is asked;
Acquisition module, for obtaining primary data according to described data interaction form from the data structure that store raw data, described data structure can support several data exchange format;
Processing module, for process described primary data according to described data interaction form and by the data feedback after process to described Web browser.
7. the Web server according to right 6, is characterized in that, processing module comprises:
Generation module, for generating the data meeting described data interaction form by described primary data;
Sending module, for giving described Web server by the described data feedback meeting described data interaction form.
8. Web server according to claim 6, is characterized in that, described Web server comprises:
Receiver module, for receiving the data request information that described Web browser sends, comprises the characteristic parameter of the data interaction form of the data of required request in described data request information.
9. Web server according to claim 8, is characterized in that, described determination module specifically for:
The characteristic parameter of the several data exchange format characteristic parameter of described data interaction form and described data structure supported mates, and the data interaction form of coupling is defined as the data interaction form of the data of described required request.
10. the method according to claim 6 to 9 any one, is characterized in that, described data interchange format is XML format, JSON form or POJO form.
CN201510863335.0A 2015-12-01 2015-12-01 Data interaction method and Web server Pending CN105335523A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510863335.0A CN105335523A (en) 2015-12-01 2015-12-01 Data interaction method and Web server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510863335.0A CN105335523A (en) 2015-12-01 2015-12-01 Data interaction method and Web server

Publications (1)

Publication Number Publication Date
CN105335523A true CN105335523A (en) 2016-02-17

Family

ID=55286050

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510863335.0A Pending CN105335523A (en) 2015-12-01 2015-12-01 Data interaction method and Web server

Country Status (1)

Country Link
CN (1) CN105335523A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407438A (en) * 2016-09-28 2017-02-15 珠海迈越信息技术有限公司 Data processing method and system
CN110134461A (en) * 2019-04-09 2019-08-16 苏宁易购集团股份有限公司 A kind of universal process method and device of data interaction
CN111726347A (en) * 2016-02-26 2020-09-29 上海交通大学 Information interaction mechanism and network transmission method in multimedia system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1906609A (en) * 2003-10-22 2007-01-31 英特尔公司 System for data format conversion for use in data centers
US20100169159A1 (en) * 2008-12-30 2010-07-01 Nicholas Rose Media for Service and Marketing
US20130086100A1 (en) * 2011-09-29 2013-04-04 International Business Machines Corporation Method and System Providing Document Semantic Validation and Reporting of Schema Violations
CN103379127A (en) * 2012-04-12 2013-10-30 阿里巴巴集团控股有限公司 Data interaction method and apparatus between server and client
CN103428076A (en) * 2013-08-22 2013-12-04 北京奇虎科技有限公司 Method and device for transmitting information to multi-type terminals or applications

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1906609A (en) * 2003-10-22 2007-01-31 英特尔公司 System for data format conversion for use in data centers
US20100169159A1 (en) * 2008-12-30 2010-07-01 Nicholas Rose Media for Service and Marketing
US20130086100A1 (en) * 2011-09-29 2013-04-04 International Business Machines Corporation Method and System Providing Document Semantic Validation and Reporting of Schema Violations
CN103379127A (en) * 2012-04-12 2013-10-30 阿里巴巴集团控股有限公司 Data interaction method and apparatus between server and client
CN103428076A (en) * 2013-08-22 2013-12-04 北京奇虎科技有限公司 Method and device for transmitting information to multi-type terminals or applications

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111726347A (en) * 2016-02-26 2020-09-29 上海交通大学 Information interaction mechanism and network transmission method in multimedia system
CN111726347B (en) * 2016-02-26 2022-04-15 上海交通大学 Information interaction mechanism and network transmission method in multimedia system
CN106407438A (en) * 2016-09-28 2017-02-15 珠海迈越信息技术有限公司 Data processing method and system
CN110134461A (en) * 2019-04-09 2019-08-16 苏宁易购集团股份有限公司 A kind of universal process method and device of data interaction

Similar Documents

Publication Publication Date Title
CN104461484B (en) The implementation method and device of front-end template
CN101217507B (en) Method, device and system for providing and altering data on network page
US9384295B2 (en) Method and apparatus for viewing collaborative documents
US7921018B2 (en) Translation system and method of providing translation service
CN104063764B (en) The device and method of Visual Production item code
CN104158836A (en) Method for rendering mobile application interface through data
CN105589909A (en) Data visualization realization system and method
CN101710274A (en) Method and system for generating help information of application software
US20160012551A1 (en) Apparatus and Application Server for Providing a Service to a User
CN105335523A (en) Data interaction method and Web server
CN101916293A (en) Method and device for introducing media information into file
CN105069116A (en) Method and system for converting json string into array
CN103795758B (en) Content-browsing, generation and exchange method, content-browsing terminal, server and system
CN107423037A (en) Application programming interfaces localization method and equipment
CN104793933B (en) A kind of terminal data shows method and system
KR20110016881A (en) Data viewer management
US11537783B2 (en) Method and system for labeling and organizing data for summarizing and referencing content via a communication network
CN102819532A (en) Obtaining and transferring method of web form data
CN111796727A (en) Interface data processing method and device
CN101719157A (en) Data filtering method, system and data processing device used for system
CN108984156A (en) A kind of software auto generating method and system for exempting from code development based on template
US9036163B2 (en) Methods and apparatuses for displaying text block and processing text block
US10986051B1 (en) System and method for dynamic chat message customization
CN101419618A (en) In-text information displaying method and apparatus
CN104217018A (en) Method and device for processing operation data

Legal Events

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

Application publication date: 20160217

RJ01 Rejection of invention patent application after publication