[go: up one dir, main page]

CN104135536A - Data interaction method of Web management system based on Json data protocols - Google Patents

Data interaction method of Web management system based on Json data protocols Download PDF

Info

Publication number
CN104135536A
CN104135536A CN201410401997.1A CN201410401997A CN104135536A CN 104135536 A CN104135536 A CN 104135536A CN 201410401997 A CN201410401997 A CN 201410401997A CN 104135536 A CN104135536 A CN 104135536A
Authority
CN
China
Prior art keywords
data
json
web
management system
processing
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
CN201410401997.1A
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.)
IEIT Systems Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201410401997.1A priority Critical patent/CN104135536A/en
Publication of CN104135536A publication Critical patent/CN104135536A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a data interaction method of a Web management system based on Json data protocols. The data interaction method comprises the steps that a Web information sending request is received, wherein the Web information sending request comprises target data needing to be sent; according to the Web information sending request, Json format assembling is carried out; according to the Json data protocols, assembled request information is packaged; according to the Web information sending request, packaged data are sent to a background through Ajax data protocols and the Json data protocols; the background analyzes and processes the Json data according to the Web information sending request; according to results obtained by analyzing and processing the Json data, the background returns the processing results of the Json data. According to the method, the data can be processed and exchanged between a client and the background of the Web management system efficiently and rapidly, and the performance of the Web management system and customer experience can be improved.

Description

一种基于json数据协议的Web管理系统数据交互方法A data interaction method for web management system based on json data protocol

技术领域 technical field

本发明涉及一种计算机应用技术领域,具体地说是一种基于json数据协议的Web管理系统数据交互方法。 The invention relates to the field of computer application technology, in particular to a data interaction method for a Web management system based on the JSON data protocol.

背景技术 Background technique

Json已经成为HTML5应用内部数据交换的实施标准,便于人阅读和编写,同时也易于机器解析和生成。Json可以将 JavaScript 对象中表示的一组数据转换为字符串,然后就可以在函数之间轻松地传递这个字符串,或者在异步应用程序中将字符串从 Web 客户机传递给服务器端程序。 JavaScript 很容易解释它,而且 Json可以表示比"名称 / 值"更复杂的结构。例如,可以表示数组和复杂的对象,而不仅仅是键和值的简单列表。 Json has become the implementation standard for internal data exchange in HTML5 applications, which is easy for humans to read and write, and is also easy for machines to parse and generate. Json can convert a set of data represented in a JavaScript object into a string, and then you can easily pass this string between functions, or pass a string from a web client to a server-side program in an asynchronous application. JavaScript interprets it easily, and Json can represent more complex structures than "name/value". For example, arrays and complex objects can be represented, not just simple lists of keys and values.

Ajax提交数据相对与原始的form表单提交更加高效,原始的form表单提交隐藏form,更新数据完成后,需要转到一个空白页面再对原页面进行提交后处理;ajax则不用,可以直接返回原页面进行提交后的处理。可见Ajax可以比隐藏form提交少增加一个页面。 Ajax submission of data is more efficient than the original form submission. The original form submission hides the form. After updating the data, you need to go to a blank page and then submit and post-process the original page; ajax is not used, you can directly return to the original page Perform post-submission processing. It can be seen that Ajax can add one page less than hidden form submission.

发明内容 Contents of the invention

本发明的目的是提供一种基于json数据协议的Web管理系统数据交互方法。 The purpose of the present invention is to provide a data interaction method of a Web management system based on the json data protocol.

本发明的目的是按以下方式实现的,使用Ajax异步传输技术,数据采用Json格式传输,以统一接口处理Ajax请求,内容包括:接收Web信息发送请求,Web信息发送请求包含需要发送的目标数据;根据Web信息发送请求进行Json格式组装;根据Json数据协议对组装好的请求信息进行封装;根据Web信息发送请求通过Ajax、Json数据协议向后台发送封装数据;后台根据Web信息发送请求解析和处理Json数据;后台根据解析和处理Json数据的结果返回Json数据的处理结果;具体交换步骤如下: The object of the present invention is realized in the following manner, using Ajax asynchronous transmission technology, data adopts Json format transmission, processes Ajax request with unified interface, and content comprises: receive Web information sending request, and Web information sending request includes the target data that needs to send; Send requests according to web information to assemble in Json format; encapsulate the assembled request information according to Json data protocol; send requests according to web information to send encapsulated data to the background through Ajax and Json data protocols; the background sends requests to parse and process Json according to web information Data; the background returns the processing result of Json data according to the results of parsing and processing Json data; the specific exchange steps are as follows:

(1)在Web管理系统客户端用户输入请求数据; (1) User input request data on the client side of the web management system;

(2)以"名称 / 值"的形式组装符合Json格式的数组数据,例如{“name”:”lilei”,”time”:”10:29”,”age”:”30”}; (2) Assemble the array data conforming to the Json format in the form of "name / value", for example {"name":"lilei","time":"10:29","age":"30"};

(3)Json封装,根据与后台约定的处理函数选择关键字键值组装进数组,然后通过转化为Json格式,此时的Json为一中在客户端的可视数据,在数据提交过程中更容易检查错误,便于开发和调试; (3) Json encapsulation, according to the processing function agreed with the background, select the keyword key value and assemble it into the array, and then convert it into Json format. At this time, Json is the visible data on the client side, which is easier in the data submission process Check errors for easy development and debugging;

(4)将Json数据异步传输到服务器端的处理引擎对Json数据进行处理,根据解析其关键字键值判断其要求的响应操作,进行对处理过程的调用,并最终返回; (4) Asynchronously transmit the Json data to the server-side processing engine to process the Json data, judge the response operation required by analyzing its keyword key value, call the processing process, and finally return;

(5)处理结果为Json格式,标识有状态关键字,客户端根据该状态判断响应结果,同时如前台有需要更新的数据也会在Json中返回,通过Ajax的回调函数接收数据并在客户端显示。 (5) The processing result is in Json format, which identifies a stateful keyword. The client judges the response result according to the state. At the same time, if there is data that needs to be updated in the foreground, it will also be returned in Json, and the data is received through the Ajax callback function and displayed on the client. show.

本发明的目的有益效果是:本发明基于Ajax、Json数据协议的Web管理系统数据交互方法可以使Web管理系统的客户端和后台之间高效、快捷的处理和交换数据,提高Web管理系统的性能和客户体验。 The beneficial effect of the purpose of the present invention is: the present invention is based on the Web management system data interaction method of Ajax, Json data protocol can make efficient, fast processing and exchange data between the client of Web management system and the background, improve the performance of Web management system and customer experience.

附图说明 Description of drawings

图1是基于Ajax、Json数据协议的Web管理系统数据交互方法的结构示意图。 Figure 1 is a schematic structural diagram of a data interaction method for a Web management system based on Ajax and Json data protocols.

具体实施方式 Detailed ways

参照说明书附图对本发明的作以下详细地说明。 The present invention will be described in detail below with reference to the accompanying drawings.

本发明的一种基于json数据协议的Web管理系统数据交互方法, 内容包括:接收Web信息发送请求,Web信息发送请求包含需要发送的目标数据;根据Web信息发送请求进行Json格式组装;根据Json数据协议对组装好的请求信息进行封装;根据Web信息发送请求通过Ajax、Json数据协议向后台发送封装数据;后台根据Web信息发送请求解析和处理Json数据;后台根据解析和处理Json数据的结果返回Json数据的处理结果; A data interaction method for a Web management system based on the json data protocol of the present invention, the content includes: receiving a Web information sending request, the Web information sending request includes the target data to be sent; performing Json format assembly according to the Web information sending request; according to the Json data The protocol encapsulates the assembled request information; sends the request according to the web information and sends the encapsulated data to the background through Ajax and Json data protocol; the background parses and processes the Json data according to the web information sending request; the background returns Json according to the result of parsing and processing the Json data the results of data processing;

实施例: Example:

具体的实施步骤如下: The specific implementation steps are as follows:

(1)在Web管理系统客户端用户输入请求数据; (1) User input request data on the client side of the web management system;

(2)以"名称 / 值"的形式组装符合Json格式的数组数据,例如{“name”:”lilei”,”time”:”10:29”,”age”:”30”}; (2) Assemble the array data conforming to the Json format in the form of "name / value", for example {"name":"lilei","time":"10:29","age":"30"};

(3)Json封装,根据与后台约定的处理函数选择关键字键值组装进数组,然后通过转化为Json格式。此时的Json为一中在客户端的可视数据,在数据提交过程中更容易检查错误,便于开发和调试; (3) Json encapsulation, according to the processing function agreed with the background, select the keyword key value to assemble into the array, and then convert it into Json format. At this time, Json is a visual data on the client side, which is easier to check for errors during data submission, and is convenient for development and debugging;

(4)将Json数据异步传输到服务器端的处理引擎对Json数据进行处理,根据解析其关键字键值判断其要求的响应操作,进行对处理过程的调用,并最终返回; (4) Asynchronously transmit the Json data to the server-side processing engine to process the Json data, judge the response operation required by analyzing its keyword key value, call the processing process, and finally return;

(5)处理结果为Json格式,标识有状态关键字,客户端可根据该状态判断响应结果。同时如前台有需要更新的数据也会在Json中返回,通过Ajax的回调函数接收数据并在客户端显示。 (5) The processing result is in Json format, which identifies a stateful keyword, and the client can judge the response result according to the state. At the same time, if there is data that needs to be updated at the front desk, it will also be returned in Json, and the data will be received through the Ajax callback function and displayed on the client.

除说明书所述的技术特征外,均为本专业技术人员的已知技术。 Except for the technical features described in the instructions, all are known technologies by those skilled in the art.

Claims (1)

1.一种基于json数据协议的Web管理系统数据交互方法, 其特征在于使用Ajax异步传输技术,数据采用Json格式传输,以统一接口处理Ajax请求,内容包括:接收Web信息发送请求,Web信息发送请求包含需要发送的目标数据;根据Web信息发送请求进行Json格式组装;根据Json数据协议对组装好的请求信息进行封装;根据Web信息发送请求通过Ajax、Json数据协议向后台发送封装数据;后台根据Web信息发送请求解析和处理Json数据;后台根据解析和处理Json数据的结果返回Json数据的处理结果;具体交换步骤如下: 1. A data interaction method for a Web management system based on the json data protocol, characterized in that it uses Ajax asynchronous transmission technology, data is transmitted in Json format, and Ajax requests are processed with a unified interface. The content includes: receiving Web information sending requests, Web information sending The request contains the target data to be sent; send the request according to the web information to assemble in Json format; encapsulate the assembled request information according to the Json data protocol; send the request according to the web information to the background through Ajax and Json data protocol; Web information sends requests to parse and process Json data; the background returns the processing results of Json data according to the results of parsing and processing Json data; the specific exchange steps are as follows: (1)在Web管理系统客户端用户输入请求数据; (1) User input request data on the client side of the web management system; (2)以"名称 / 值"的形式组装符合Json格式的数组数据,例如{“name”:”lilei”,”time”:”10:29”,”age”:”30”}; (2) Assemble the array data conforming to the Json format in the form of "name / value", for example {"name":"lilei","time":"10:29","age":"30"}; (3)Json封装,根据与后台约定的处理函数选择关键字键值组装进数组,然后通过转化为Json格式,此时的Json为一中在客户端的可视数据,在数据提交过程中更容易检查错误,便于开发和调试; (3) Json encapsulation, according to the processing function agreed with the background, select the keyword key value and assemble it into the array, and then convert it into Json format. At this time, Json is the visible data on the client side, which is easier in the data submission process Check errors for easy development and debugging; (4)将Json数据异步传输到服务器端的处理引擎对Json数据进行处理,根据解析其关键字键值判断其要求的响应操作,进行对处理过程的调用,并最终返回; (4) Asynchronously transmit the Json data to the server-side processing engine to process the Json data, judge the response operation required by analyzing its keyword key value, call the processing process, and finally return; (5)处理结果为Json格式,标识有状态关键字,客户端根据该状态判断响应结果,同时如前台有需要更新的数据也会在Json中返回,通过Ajax的回调函数接收数据并在客户端显示。 (5) The processing result is in Json format, which identifies a stateful keyword. The client judges the response result according to the state. At the same time, if there is data that needs to be updated in the foreground, it will also be returned in Json, and the data is received through the Ajax callback function and displayed on the client. show.
CN201410401997.1A 2014-08-15 2014-08-15 Data interaction method of Web management system based on Json data protocols Pending CN104135536A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410401997.1A CN104135536A (en) 2014-08-15 2014-08-15 Data interaction method of Web management system based on Json data protocols

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410401997.1A CN104135536A (en) 2014-08-15 2014-08-15 Data interaction method of Web management system based on Json data protocols

Publications (1)

Publication Number Publication Date
CN104135536A true CN104135536A (en) 2014-11-05

Family

ID=51808058

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410401997.1A Pending CN104135536A (en) 2014-08-15 2014-08-15 Data interaction method of Web management system based on Json data protocols

Country Status (1)

Country Link
CN (1) CN104135536A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104933487A (en) * 2015-06-26 2015-09-23 南京邮电大学 Medicine retrospective application oriented medicine inquiry optimization method
CN104994122A (en) * 2015-05-12 2015-10-21 深圳市微阳信息技术有限公司 Business communication method and system based on JSON data protocol
CN106302349A (en) * 2015-05-29 2017-01-04 北京京东尚科信息技术有限公司 Method and device analyzed by HTTP bag based on libpcap
CN106992870A (en) * 2017-03-31 2017-07-28 苏州乐麟无线信息科技有限公司 Compatible charging method based on json
CN107222543A (en) * 2017-06-14 2017-09-29 北京掌上时惠科技有限公司 A kind of mobile APP and the Web page means of communication and system
CN107634979A (en) * 2016-07-19 2018-01-26 北京发那科机电有限公司 A kind of transmission method and device of computer digital control machine tool data
CN107769909A (en) * 2017-09-29 2018-03-06 四川长虹电器股份有限公司 The method that a kind of front end data of Egret engines sends processing
CN108717382A (en) * 2018-05-11 2018-10-30 北京奇虎科技有限公司 Audio-video document processing method, device and terminal device based on JSON structures
CN114040018A (en) * 2021-10-11 2022-02-11 许昌许继软件技术有限公司 Data receiving and transmitting method and device based on JSON data format
CN115002935A (en) * 2022-08-03 2022-09-02 深圳市亿联无限科技有限公司 Method and system for realizing interaction between router and mobile phone APP
CN115562791A (en) * 2022-11-07 2023-01-03 四川天邑康和通信股份有限公司 Direct interaction method between the page and the bottom layer based on the MDM JSON CGI interface

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442515A (en) * 2007-11-22 2009-05-27 深圳市科陆电子科技股份有限公司 Remote control method based on browser
CN101694618A (en) * 2009-09-01 2010-04-14 卡斯柯信号有限公司 Automatic mapping method of model layer and view layer data suitable for AJAX frame
CN103645951A (en) * 2013-12-19 2014-03-19 北京邮电大学 Cross-platform mobile data management system and method
CN103677789A (en) * 2012-09-25 2014-03-26 深圳市金正方科技有限公司 Table data displaying method and system based on GRID assembly

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442515A (en) * 2007-11-22 2009-05-27 深圳市科陆电子科技股份有限公司 Remote control method based on browser
CN101694618A (en) * 2009-09-01 2010-04-14 卡斯柯信号有限公司 Automatic mapping method of model layer and view layer data suitable for AJAX frame
CN103677789A (en) * 2012-09-25 2014-03-26 深圳市金正方科技有限公司 Table data displaying method and system based on GRID assembly
CN103645951A (en) * 2013-12-19 2014-03-19 北京邮电大学 Cross-platform mobile data management system and method

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104994122B (en) * 2015-05-12 2019-02-19 深圳市微阳信息技术有限公司 A kind of newsletter method based on JSON data protocol
CN104994122A (en) * 2015-05-12 2015-10-21 深圳市微阳信息技术有限公司 Business communication method and system based on JSON data protocol
CN106302349A (en) * 2015-05-29 2017-01-04 北京京东尚科信息技术有限公司 Method and device analyzed by HTTP bag based on libpcap
CN106302349B (en) * 2015-05-29 2020-06-05 北京京东尚科信息技术有限公司 HTTP packet analysis method and device based on libpcap
CN104933487A (en) * 2015-06-26 2015-09-23 南京邮电大学 Medicine retrospective application oriented medicine inquiry optimization method
CN107634979A (en) * 2016-07-19 2018-01-26 北京发那科机电有限公司 A kind of transmission method and device of computer digital control machine tool data
CN106992870A (en) * 2017-03-31 2017-07-28 苏州乐麟无线信息科技有限公司 Compatible charging method based on json
CN107222543A (en) * 2017-06-14 2017-09-29 北京掌上时惠科技有限公司 A kind of mobile APP and the Web page means of communication and system
CN107222543B (en) * 2017-06-14 2020-06-05 北京掌上时惠科技有限公司 Mobile APP and Web page communication method and system
CN107769909A (en) * 2017-09-29 2018-03-06 四川长虹电器股份有限公司 The method that a kind of front end data of Egret engines sends processing
CN108717382A (en) * 2018-05-11 2018-10-30 北京奇虎科技有限公司 Audio-video document processing method, device and terminal device based on JSON structures
CN108717382B (en) * 2018-05-11 2021-07-13 北京奇虎科技有限公司 Audio and video file processing method, device and terminal device based on JSON structure
CN114040018A (en) * 2021-10-11 2022-02-11 许昌许继软件技术有限公司 Data receiving and transmitting method and device based on JSON data format
CN115002935A (en) * 2022-08-03 2022-09-02 深圳市亿联无限科技有限公司 Method and system for realizing interaction between router and mobile phone APP
CN115002935B (en) * 2022-08-03 2023-05-09 深圳市亿联无限科技有限公司 A method and system for realizing interaction between router and mobile phone APP
CN115562791A (en) * 2022-11-07 2023-01-03 四川天邑康和通信股份有限公司 Direct interaction method between the page and the bottom layer based on the MDM JSON CGI interface

Similar Documents

Publication Publication Date Title
CN104135536A (en) Data interaction method of Web management system based on Json data protocols
CN106341444B (en) Data access method and device
CN102577327B (en) A method, device and system for realizing web page browsing in remote desktop environment
US11451616B2 (en) Terminal emulation over HTML
CN106997298B (en) Application resource acquisition method and device
CN102882974B (en) Method for saving website access resources by identifying version number of website
CN116431316B (en) Task processing method, system, platform and automatic question-answering method
CN104484353A (en) Data imaging method, data imaging device and database server
CN112256772A (en) Data service method, device and readable storage medium
CN108038212B (en) Data interaction method, device, system, equipment and storage medium
CN114547199A (en) Database increment synchronous response method and device and computer readable storage medium
CN103929477B (en) Without coupling integration analogy method and system between system based on Http agreements
CN113050921A (en) Webpage conversion method, device, storage medium and computer equipment
CN113051510B (en) Interactive processing method, device, front-end device, back-end device and storage medium
CN103324567B (en) A kind of adjustment method of application engine and debug system
CN109885347B (en) Method, device, terminal, system and storage medium for acquiring configuration data
CN103473105A (en) Realizing method of online code completion function
CN102799764A (en) Web-based engineering calculation system and method
CN108388372A (en) Method, device and equipment for self-adapting touch data and storage medium
CN107391175B (en) Control data configuration method and computer readable storage medium
CN108650183A (en) A kind of unmanned plane information query system based on Web dynamic routing matching techniques
CN104980459B (en) A kind of method and website access device of application program operation
CN105468636A (en) Dynamic web page picture loading method, apparatus and system
US10592388B1 (en) Methods for facilitating more efficient network message exchange and analysis and devices thereof
US8977718B2 (en) Website redevelopment wrapper

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20141105

WD01 Invention patent application deemed withdrawn after publication