Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method, client and server for asynchronous cross-domain transmission on extensible markup language (XML) data

A client-side and server-side technology, applied in the field of data transmission, can solve the problems of long delay in XML data transmission and achieve the effect of reducing data transmission delay

Inactive Publication Date: 2012-06-06
TENCENT TECH (SHENZHEN) CO LTD
View PDF5 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] When XML data is transmitted asynchronously across domains, the server under the current security domain needs to act as a transit agent, resulting in a large delay in XML data transmission

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method, client and server for asynchronous cross-domain transmission on extensible markup language (XML) data
  • Method, client and server for asynchronous cross-domain transmission on extensible markup language (XML) data
  • Method, client and server for asynchronous cross-domain transmission on extensible markup language (XML) data

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0052] see figure 1 , this embodiment provides a method for asynchronous cross-domain transmission of XML data, including:

[0053] 101: Convert the Extensible Markup Language XML request data into a request string;

[0054] 102: Send an asynchronous cross-domain data request to the cross-domain server through an external file reference link, where the asynchronous cross-domain data request carries a request string.

[0055] Among them, the external file reference link can be 标签。

[0056]参见图2,本实施例提供了一种异步跨域传输XML数据的方法,包括:

[0057]201:接收跨域客户端发送的异步跨域数据请求,并获取异步跨域数据请求中携带的请求字符串;

[0058]202:根据请求字符串,获取可扩展标记语言XML响应数据;

[0059]203:将XML响应数据转换成响应字符串;

[0060]204:以jsp格式向跨域客户端返回异步跨域数据响应,该异步跨域数据响应携带响应字符串。

[0061]本实施例通过将XML格式的数据转换成字符串,将字符串以特定形式在客户端及其跨域服务端之间直接传输,无须中转代理,降低了XML数据传输时延。

[0062]参见图3,下面结合具体实例介绍上述异步跨域传输XML数据的方法。

[0063]301:客户端将XML请求数据转换成请求字符串;

[0064]302:可选的,客户端将该请求字符串保存在URL(Uniform Resource Locator,统一资源定位符)参数中;

[0065]303:客户端通过外部文件引用链接向跨域服务端发送异步跨域数据请求,该异步跨域数据请求携带请求字符串;

[0066]其中,外部文件引用链接可以为标签。

[0067]进一步的,如果执行...

Embodiment 2

[0083]参见图4,本实施例提供了一种异步跨域传输XML数据的客户端,包括:

[0084]第一转换模块401,用于将可扩展标记语言XML请求数据转换成请求字符串;

[0085]发送模块402,用于通过外部文件引用链接向跨域服务端发送异步跨域数据请求,异步跨域数据请求携带请求字符串。

[0086]进一步的,客户端还包括:

[0087]第一保存模块,用于执行第一转换模块401之后,将请求字符串保存在统一资源定位符URL参数中;

[0088]发送模块402,还用于通过外部文件引用链接向跨域服务端发送异步跨域数据请求,异步跨域数据请求携带URL参数。

[0089]进一步的,客户端还包括:

[0090]第一接收模块,用于执行发送模块402之后,接收跨域服务端返回的异步跨域数据响应,异步跨域数据响应携带响应字符串;

[0091]第一转换模块401,还用于将响应字符串转换成XML响应数据。

[0092]本实施例提供的客户端,与方法实施例中的客户端属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。

[0093]本实施例通过将XML格式的数据转换成字符串,将字符串以特定形式在客户端及其跨域服务端之间直接传输,无须中转代理,降低了XML数据传输时延。另外,由于客户端可以直接请求、传输、存取第三方安全域名的数据,方便Web前端开发工程师实现页面展示、用户体验、客户端交互逻辑等业务特性。

Embodiment 3

[0095]参见图5,本实施例提供了一种异步跨域传输XML数据的服务端,包括:

[0096]第二接收模块501,用于接收跨域客户端发送的异步跨域数据请求,并获取异步跨域数据请求中携带的请求字符串;

[0097]获取模块502,用于根据请求字符串,获取可扩展标记语言XML响应数据;

[0098]第二转换模块503,用于将XML响应数据转换成响应字符串;

[0099]响应模块504,用于以jsp格式向跨域客户端返回异步跨域数据响应,异步跨域数据响应携带响应字符串。

[0100]进一步的,服务端还包括:

[0101]第二保存模块,用于执行第二转换模块503之后,将响应字符串保存在javascript变量中;

[0102]响应模块504,还用于以jsp格式向跨域客户端返回异步跨域数据响应,异步跨域数据响应携带javascript变量。

[0103]本实施例提供的服务端,与方法实施例中的的跨域服务端属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。

[0104]本实施例通过将XML格式的数据转换成字符串,将字符串以特定形式在服务端及其跨域客户端之间直接传输,无须中转代理,降低了XML数据传输时延。另外,本实施例提供的服务端使客户端可以直接请求、传输、存取第三方安全域名的数据,方便Web前端开发工程师实现页面展示、用户体验、客户端交互逻辑等业务特性。

[0105]以上实施例提供的技术方案中的全部或部分内容可以通过软件编程实现,其软件程序存储在可读取的存储介质中,存储介质例如:计算机中的硬盘、光盘或软盘。

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method, a client and a server for asynchronous cross-domain transmission on extensible markup language (XML) data, which belong to the field of data transmission. For the client, the method comprises the following steps: converting XML request data into a request character string; sending an asynchronous cross-domain data request to a cross-domain server through external file reference interlinkage, wherein the request character string is carried by the asynchronous cross-domain data request. For the server, the method comprises the following steps: receiving the asynchronous cross-domain data request sent by a cross-domain client, and acquiring the request character string carried in the asynchronous cross-domain data request; according to the request character string, acquiring corresponding XML response data; converting the XML response data into a response character string; and returning an asynchronous cross-domain data response to the cross-domain client in a Java server page (jsp) format, wherein the response character string is carried by the asynchronous cross-domain data response. In the method, the client and the server for the asynchronous cross-domain transmission on the extensible markup language (XML) data, through converting the data of an XML format into the character string, and directly transmitting the character string between the client and the cross-domain server thereof in a specific mode without a transfer agent, the time delay of XML data transmission is reduced.

Description

technical field [0001] The invention relates to the field of data transmission, in particular to a method for asynchronous cross-domain transmission of XML data, a client and a server. Background technique [0002] The data required by the network platform are often scattered and stored under different domain names. For example, the data required by the Paipai Information Center in the early stage of development are stored under different domain names. Synchronously fetching data stored on servers under other domain names through the server under the current domain name has a great impact on the performance of the server interface and request timeout. [0003] In order to solve the above problems, a scheme in which the client directly sends a request to obtain data under the third-party security domain can be adopted. However, the client can only perform asynchronous cross-domain data transmission and requests for json (JavaScript Object Notation) or jsp (Java Server Pages)...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30
Inventor 黄浩明胡涛刘尧
Owner TENCENT TECH (SHENZHEN) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products