Method, device and system for providing and altering data on network page

A webpage data and data technology, applied in the Internet field, can solve the problems of large data package files, cross-domain, data redundancy, etc.

Inactive Publication Date: 2008-07-09
SHENZHEN THUNDER NETWORK TECH
View PDF0 Cites 29 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0020] The embodiment of the present invention relates to a method, device and system for providing and replacing data in a web page, so as to solve the pr

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, device and system for providing and altering data on network page
  • Method, device and system for providing and altering data on network page
  • Method, device and system for providing and altering data on network page

Examples

Experimental program
Comparison scheme
Effect test

example

[0098]1、网页页面所要替换的部分运用html标签(div、span等)来封装。

[0099]2、在所替换数据的开头和结尾可用及标记。其中xxx为所要替换数据对应的节点标记。

[0100]3、其中在"[]”中的例如[%=id%]、[%=content@pf=″showContent(str)″%]等(参见下文中代码片段),为需要替换的节点值(节点值标记该节点的值,也就是对象的键值,这个值是根据数据库中对应表里对应字段的某一个值,具体根据业务逻辑查数据库);@pf=″showContent(str)为对节点值进行预处理函数的写法,其会将替换出来的值先导入到showContent(str)这个函数中按需求处理后再显示。

[0101]代码片段如下:

[0102]

[0103]                

[0104]                [%=commenter@pf=″showCmtBlogUinTemp(str)″%]

[0105]                

[0106]                           [%=id%]

[0107]href=″javascript:;″onclick=″addComment(this,1)″>支持

[0108][%=usableNum%] ;    

[0109]onclick=″addComment(this,0)″>反对[%=unusableNum%] ;

[0110]

[0111]target=_blank>回复

[0112][%=rplNum%][%=userInfo@pf=″showCmtNick(str)″%]&

[0113]nbsp;发表于[%=time%]

[0114]                    [%=content@pf=″showContent(str)″%]

[0115]             

[0116]                 

[0117]             

[0118]             

[0119]             

[0120]            ...

Embodiment 2

[0132]服务器实施例2、参见图4所示,其包括:请求接收单元11、第一查询单元13、第一生成单元14、保存单元15、查找单元16,以及数据页提供单元12。

[0133]请求接收单元11,用于接收客户端发来的网页数据替换请求消息。

[0134]第一查询单元13,用于定期查询数据库,该数据库存储了网页中需要替换的数据值。

[0135]第一生成单元14,用于根据第一查询单元13的查询结果,更新生成静态的JSON数据页。

[0136]保存单元15,用于保存第一生成单元14更新生成的JSON数据页。

[0137]查找单元16,用于根据所述网页数据替换请求消息,从保存单元15中查找对应的JSON数据页,并传送给数据页提供单元12。

[0138]数据页提供单元12,用于向客户端提供JSON数据页。

Embodiment 3

[0139]服务器实施例3、参见图5所示,其包括:请求接收单元11、第二查询单元17、第二生成单元18和数据页提供单元12。

[0140]请求接收单元11,用于接收客户端发来的网页数据替换请求消息。

[0141]第二查询单元17,用于根据所述网页数据替换请求消息查询数据库,该数据库存储了网页中需要替换的数据值。

[0142]第二生成单元18,用于根据第二查询单元17的查询结果,生成JSON数据页,并将生成的JSON数据页传送给数据页提供单元12。

[0143]数据页提供单元12,用于向客户端提供JSON数据页。

[0144]至此,本发明的服务器1描述完毕,以下通过1个实施例描述本发明的客户端2。

[0145]客户端实施例1、参见图6所示,其包括:数据页接收单元21、获取单元22、匹配单元23和替换单元24。

[0146]数据页接收单元21,用于接收服务器提供的JSON数据页。

[0147]获取单元22,用于获取网页中第一待替换数据对应的节点标识。

[0148]匹配单元23,用于以第一待替换数据对应的节点标识与JSON数据页中包含的数据节点标识进行匹配。

[0149]替换单元24,用于以匹配得到的节点标识对应的JSON格式的数据替换第一待替换数据。

[0150]至此,本发明的客户端2描述完毕,以下通过3个实施例描述本发明的系统。

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 device and a system to provide and substitute the web pages in the field of internet, so as to solve the problems of cross-domain, data redundancy, and large amount of data packet files, etc., when carrying out the proposal of using the xml technique to substitute the web page templates. The method for providing the data to be substituted includes that a server receives a web page data substituting request information sent by a client; the server provides the client with a JSON data page containing the identifiers of data nodes. The method for substituting the data in the web page includes that the client end receives the JSON data page containing the identifiers of the data nodes provided by the server; the client end gets the node identifier corresponding to the first data to be substituted in the web page; the client matches the node identifier corresponding to the first data to be substituted with the data node identifier contained by the JSON data page; and finally, the client end substitutes the first data to be substituted with the data of JSON format corresponding to the node identifier gained by the matching.

Description

technical field [0001] The invention relates to the Internet field, in particular to a method, device and system for providing and replacing data in webpages. Background technique [0002] In web page development technology, template replacement technology is often used to facilitate data update in web pages. Templates are replaced with a set of fixed page formats based on predefined rules, and fixed tags are replaced by different imported data. An operation for pinning data nodes. [0003] Existing web page template replacement is usually based on xml (Extensible Markup Language, which is a data storage language that uses simple tags to describe data) technology, that is, after the server receives the data access request from the client, it directly The data in xml format is returned, and the client performs parsing and replacement operations according to some preset frameworks (such as: ajax framework). [0004] But this scheme has the following problems: [0005] 1. XM...

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
IPC IPC(8): H04L12/58G06F17/30
Inventor 马丁
Owner SHENZHEN THUNDER NETWORK TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products