CN101815064A - Data interaction method and device thereof - Google Patents

Data interaction method and device thereof Download PDF

Info

Publication number
CN101815064A
CN101815064A CN201010033885A CN201010033885A CN101815064A CN 101815064 A CN101815064 A CN 101815064A CN 201010033885 A CN201010033885 A CN 201010033885A CN 201010033885 A CN201010033885 A CN 201010033885A CN 101815064 A CN101815064 A CN 101815064A
Authority
CN
China
Prior art keywords
data content
client
information system
geographic information
server end
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
CN201010033885A
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 Cennavi Technologies Co Ltd
Original Assignee
Beijing Cennavi Technologies 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 Cennavi Technologies Co Ltd filed Critical Beijing Cennavi Technologies Co Ltd
Priority to CN201010033885A priority Critical patent/CN101815064A/en
Publication of CN101815064A publication Critical patent/CN101815064A/en
Priority to PCT/CN2010/080180 priority patent/WO2011082629A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Remote Sensing (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a data interaction method and a device thereof, and relates to the field of traffic information and digital maps to solve the problem of longer operation response time of the user caused by repeated transmission, larger load and lower efficiency of the same data on the network. The invention comprises the technical scheme that: a data interaction device generates an XMLHTTP request according to a preset XMLHTTP request object and input content of a client in a network geographic information system; and the data interaction device transmits the XMLHTTP request to a server in the network geographic information system so as to realize data asynchronous interaction between the server and the client. The technical scheme provided by the embodiment of the invention is applicable to the network geographic information system.

Description

The method and apparatus of data interaction
Technical field
The present invention relates to transport information and numerical map field, relate in particular to a kind of method and apparatus of data interaction.
Background technology
Network geographic information system (WEB-GIS) refers to the platform based on Internet, and client application software adopts procotol, is used in the GIS-Geographic Information System on the Internet.Generally by many main frames, multiple database and a plurality of client go up with the distributed Internet of being connected and form, comprise following four parts: WEB-GIS browser (browser), the WEB-GIS server, WEB-GIS editing machine (Editor), WEB-GIS information agency (information agent).
In the prior art, in the network geographic information system, carry out mode that data interaction adopt synchronous interaction between WEB-GIS browser and the WEB-GIS server more, trigger a HTTP by client and ask server, server returns a new HTML page or leaf to client after this request is handled.
In realizing process of the present invention, the inventor finds, in the process of the mode of WEB-GIS employing synchronous data interaction, the WEB-GIS server is when handling request, and in the time of transmitting the map grating image, user's most time is in the state of wait, and screen content also is a blank out.When duty ratio hour, the time that the user waits for may be limited, do not embody delay, but in WEB-GIS, the map that the WEB-GIS server produces changes the mode that converts to behind the grille picture with binary stream in Internet communication, and same data are transmission repeatedly on network, and load is bigger, efficient is very low, thereby causes user's long problem of operation response time.
Summary of the invention
Embodiments of the invention provide a kind of method and apparatus of data interaction, and to solve because same data are transmitted on network repeatedly, and load is bigger, efficient is very low, thereby causes user's long problem of operation response time.
For achieving the above object, embodiments of the invention adopt following technical scheme:
A kind of method of data interaction, be applied to network geographic information system, described network geographic information system comprises data interaction device, and the method for described data interaction comprises: described data interaction device generates the XMLHTTP request according to the input content of client in default XMLHTTP request object and the described network geographic information system; Described data interaction device sends described XMLHTTP and asks to the server end in the described network geographic information system, to realize the data asynchronous interactive between described server end and the described client.
A kind of device of data interaction comprises:
Generation unit is used for generating the XMLHTTP request according to the input content of default XMLHTTP request object and network geographic information system client;
First transmitting element is used for sending XMLHTTP that generation unit generates and asks server end to network geographic information system, to realize the data asynchronous interactive between described server end and the described client.
The method and apparatus of the data interaction that the embodiment of the invention provides, utilize default XMLHTTP request object to send XMLHTTP and ask server end to WEB-GIS, to realize the data asynchronous interactive between WEB-GIS server end and the WEB-GIS client, when the WEB-GIS client sends request to the WEB-GIS server end, these requests are not directly to send to the WEB-GIS server end, but by sending to the WEB-GIS server end again after the data interaction device processing, when the WEB-GIS server end is given the WEB-GIS client by the data interaction device return data, the WEB-GIS client does not need to upgrade whole webpage, and a new web page part more just, solved in the prior art because the transmission repeatedly on network of same data, load is bigger, efficient is very low, thereby causes user's long problem of operation response time.
Description of drawings
The method flow diagram of the data interaction that Fig. 1 provides for the embodiment of the invention;
The method flow diagram of the data interaction that Fig. 2 provides for further embodiment of this invention;
The flow chart one of step 202 in the method flow diagram of the data interaction that Fig. 3 provides for inventive embodiments shown in Figure 2;
The flowchart 2 of step 202 in the method flow diagram of the data interaction that Fig. 4 provides for inventive embodiments shown in Figure 2;
The apparatus structure schematic diagram one of the data interaction that Fig. 5 provides for the embodiment of the invention;
The apparatus structure schematic diagram two of the data interaction that Fig. 6 provides for the embodiment of the invention;
The apparatus structure schematic diagram three of the data interaction that Fig. 7 provides for the embodiment of the invention.
Embodiment
Because the transmission repeatedly on network of same data, load is bigger in order to solve in the prior art, and efficient is very low, thereby causes user's long problem of operation response time, and the embodiment of the invention provides a kind of method and apparatus of data interaction.
As shown in Figure 1, the method for the data interaction that the embodiment of the invention provides is applied to network geographic information system, and described network geographic information system comprises data interaction device, and the method for described data interaction comprises:
Step 101, described data interaction device generates the XMLHTTP request according to the input content of client in default XMLHTTP request object and the described network geographic information system;
Step 102, described data interaction device send described XMLHTTP and ask to the server end in the described network geographic information system, to realize the data asynchronous interactive between described server end and the described client.
The method of the data interaction that the embodiment of the invention provides, utilize default XMLHTTP request object to send XMLHTTP and ask server end to WEB-GIS, to realize the data asynchronous interactive between WEB-GIS server end and the WEB-GIS client, when the WEB-GIS client sends request to the WEB-GIS server end, these requests are not directly to send to the WEB-GIS server end, but by sending to the WEB-GIS server end again after the data interaction device processing, when the WEB-GIS server end is given the WEB-GIS client by the data interaction device return data, the WEB-GIS client does not need to upgrade whole webpage, and a new web page part more just, solved in the prior art because the transmission repeatedly on network of same data, load is bigger, efficient is very low, thereby causes user's long problem of operation response time.
In order to make those skilled in the art can more be expressly understood the technical scheme that the embodiment of the invention provides, below by specific embodiment, the method for the data interaction that the embodiment of the invention is provided is elaborated.
As shown in Figure 2, the method for the data interaction that another embodiment of the present invention provides comprises:
Step 201, described data interaction device generates the XMLHTTP request according to the input content of client in default XMLHTTP request object and the described network geographic information system;
In described step 201, the default of described XMLHTTP request object realized by the following method:
Initial work: use html tag<script language=" JavaScript "〉one section JavaScript of expression beginning, and use</script〉as end, what wherein comprise is exactly the JavaScript code.
Statement XmlHttp request object:
var?xmlHttp=new?ActiveXObject(“Msxml12.XMLHTTP”);
What deserves to be explained is that XmlHttpRequest is built-in according to browser, the Firefox browser uses var xmlLHttpReq=new XMLHttpRequest ().
The association attributes of XMLHttp request is set: as, open () method has three parameters, first parameter, and our HTTP request is submitted in expression in which way to server, because the WebGIS data volume is bigger, so select the mode of POST; Second parameter is a URL, the so-called network address that data content is obtained in the expression plan; What the 3rd parametric t rue representative was submitted to is an asynchronous XMLHTTP request.
Step 202, described data interaction device send described XMLHTTP and ask to the server end in the described network geographic information system, to realize the data asynchronous interactive between described server end and the described client.
In the present embodiment, described transmission XMLHTTP request is the send () method by call XML Http request object: send () method is used for sending request to server, also can pass the ginseng operation certainly.
As shown in Figure 3, realize the data asynchronous interactive between described server end and the described client described in the described step 202, comprising:
Step 2021, described data interaction device receives the data content that described server end returns, and described data content is to be obtained according to the database request response of described XMLHTTP request in described network geographic information system by described server end;
Step 2022, described data interaction device send described data content to described client.
In the present embodiment, described data content is the data content of string type or the data content of standard XML type.The data content of String type can be obtained by the responseText attribute of XMLHttp request object, also standard XML categorical data content can be obtained by the responseXML attribute of XMLHttp request object.
Further, for the accuracy that guarantees that asynchronous data is mutual, as shown in Figure 4, the described data content of described transmission also comprises to before the described client:
Step 2023, whether whether complete and described data content is correct according to the described data content of the determined property of described XMLHTTP request object for described data interaction device;
In the present embodiment, whether whether complete and described data content is correct to judge described data content by a default return function.
Described default return function, realize by the following method:
Specify a function, afterwards with the handle of this function, the function name among the JavaScript just, assignment is given the onreadystatechange attribute in the XMLHttpRequest object.Judge at first whether XMLHttp request object readyState property value equals 4,4 representative datas and all receive.That judge then whether XMLHttpRequest object status property value equal that 200,200 representative server ends return is correct result.
Step 2024, when complete and described data content was correct when described data content, described data interaction device allowed to send the client of described data content to network geographic information system.
In the present embodiment, the XMLHttp request object readyState property value that only obtains in described step 2023 equals 4, and XMLHttpRequest object status property value equals at 200 o'clock, allows to send the client of described data content to network geographic information system.
The method of the data interaction that the embodiment of the invention provides, utilize default XMLHTTP request object to send XMLHTTP and ask server end to WEB-GIS, to realize the data asynchronous interactive between WEB-GIS server end and the WEB-GIS client, when the WEB-GIS client sends request to the WEB-GIS server end, these requests are not directly to send to the WEB-GIS server end, but by sending to the WEB-GIS server end again after the data interaction device processing, when the WEB-GIS server end is given the WEB-GIS client by the data interaction device return data, the WEB-GIS client does not need to upgrade whole webpage, and a new web page part more just, solved in the prior art because the transmission repeatedly on network of same data, load is bigger, efficient is very low, thereby causes user's long problem of operation response time.
The device of the data interaction that the embodiment of the invention provides as shown in Figure 5, comprising:
Generation unit 301 is used for generating the XMLHTTP request according to the input content of default XMLHTTP request object and network geographic information system client; Concrete implementation method can be described referring to step 202 as shown in Figure 2, repeats no more herein.
First transmitting element 302 is used for sending XMLHTTP that generation unit generates and asks server end to network geographic information system, to realize the data asynchronous interactive between described server end and the described client.Concrete implementation method can be described referring to step 202 as shown in Figure 2, repeats no more herein.
As shown in Figure 6, the device of the data interaction that further embodiment of this invention provides also comprises:
Receiving element 303 is used to receive the data content that described server end returns, and described data content is to be obtained according to the database request response of described XMLHTTP request in described network geographic information system by described server end; Concrete implementation method can be described referring to step 2021 as shown in Figure 3, repeats no more herein.
Second transmitting element 304 is used to send the data content of described receiving element reception to described client.Concrete implementation method can be described referring to step 2022 as shown in Figure 3, repeats no more herein.
Further, for the accuracy that guarantees that asynchronous data is mutual, as shown in Figure 7, the device of described data interaction also comprises:
Judging unit 305, whether whether complete and described data content is correct to be used for the data content that receives according to the described receiving element of the determined property of described XMLHTTP request object; Concrete implementation method can be described referring to step 2023 as shown in Figure 3, repeats no more herein.
Allow unit 306, when being used for when described data content that complete and described data content is correct, allow described second transmitting element to send the client of described data content to network geographic information system.Concrete implementation method can be described referring to step 2024 as shown in Figure 3, repeats no more herein.
Described data interaction device is the AJAX engine between described WEB-GIS server end and WEB-GIS client.
The device of the data interaction that the embodiment of the invention provides, utilize default XMLHTTP request object to send XMLHTTP and ask server end to WEB-GIS, to realize the data asynchronous interactive between WEB-GIS server end and the WEB-GIS client, when the WEB-GIS client sends request to the WEB-GIS server end, these requests are not directly to send to the WEB-GIS server end, but by sending to the WEB-GIS server end again after the data interaction device processing, when the WEB-GIS server end is given the WEB-GIS client by the data interaction device return data, the WEB-GIS client does not need to upgrade whole webpage, and a new web page part more just, solved in the prior art because the transmission repeatedly on network of same data, load is bigger, efficient is very low, thereby causes user's long problem of operation response time.
The method and the device of the data interaction that the embodiment of the invention provides are applicable to network geographic information system.
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description method is to instruct relevant hardware to finish by program, described program can be stored in the computer-readable recording medium, as ROM/RAM, magnetic disc or CD etc.
The above; only be the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily changing or replacing, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of described claim.

Claims (7)

1. the method for a data interaction is applied to network geographic information system, it is characterized in that, described network geographic information system comprises data interaction device, and the method for described data interaction comprises:
Described data interaction device generates the XMLHTTP request according to the input content of client in default XMLHTTP request object and the described network geographic information system;
Described data interaction device sends described XMLHTTP and asks to the server end in the described network geographic information system, to realize the data asynchronous interactive between described server end and the described client.
2. method according to claim 1 is characterized in that, the data asynchronous interactive between described server end of described realization and the described client comprises:
Described data interaction device receives the data content that described server end returns, and described data content is to be obtained according to the database request response of described XMLHTTP request in described network geographic information system by described server end;
Described data interaction device sends described data content to described client.
3. method according to claim 2 is characterized in that, the described data content of described transmission also comprises to before the described client:
Whether whether complete and described data content is correct according to the described data content of the determined property of described XMLHTTP request object for described data interaction device;
When complete and described data content was correct when described data content, described data interaction device allowed to send the client of described data content to network geographic information system.
4. method according to claim 3 is characterized in that, described data content is the data content of string type or the data content of standard XML type.
5. the device of a data interaction is characterized in that, comprising:
Generation unit is used for generating the XMLHTTP request according to the input content of default XMLHTTP request object and network geographic information system client;
First transmitting element is used for sending XMLHTTP that generation unit generates and asks server end to network geographic information system, to realize the data asynchronous interactive between described server end and the described client.
6. device according to claim 5 is characterized in that, also comprises:
Receiving element is used to receive the data content that described server end returns, and described data content is to be obtained according to the database request response of described XMLHTTP request in described network geographic information system by described server end;
Second transmitting element is used to send the data content of described receiving element reception to described client.
7. device according to claim 6 is characterized in that, also comprises:
Judging unit, whether whether complete and described data content is correct to be used for the data content that receives according to the described receiving element of the determined property of described XMLHTTP request object;
Allow the unit, when being used for when described data content that complete and described data content is correct, allow described second transmitting element to send the client of described data content to network geographic information system.
CN201010033885A 2010-01-11 2010-01-11 Data interaction method and device thereof Pending CN101815064A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201010033885A CN101815064A (en) 2010-01-11 2010-01-11 Data interaction method and device thereof
PCT/CN2010/080180 WO2011082629A1 (en) 2010-01-11 2010-12-23 Method and device for data interaction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010033885A CN101815064A (en) 2010-01-11 2010-01-11 Data interaction method and device thereof

Publications (1)

Publication Number Publication Date
CN101815064A true CN101815064A (en) 2010-08-25

Family

ID=42622181

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010033885A Pending CN101815064A (en) 2010-01-11 2010-01-11 Data interaction method and device thereof

Country Status (2)

Country Link
CN (1) CN101815064A (en)
WO (1) WO2011082629A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011082629A1 (en) * 2010-01-11 2011-07-14 北京世纪高通科技有限公司 Method and device for data interaction
CN104077117A (en) * 2013-03-26 2014-10-01 联想(北京)有限公司 Information processing method and control point equipment
CN106126595A (en) * 2016-06-20 2016-11-16 浪潮电子信息产业股份有限公司 A kind of document down loading method and device
CN108540545A (en) * 2018-03-27 2018-09-14 武汉理工大学 The two-way dual asynchronous transport method of cloud computing environment spatial data based on multi-Agent
CN109032583A (en) * 2018-07-25 2018-12-18 北京小米移动软件有限公司 Data interactive method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090125799A1 (en) * 2007-11-14 2009-05-14 Kirby Nathaniel B User interface image partitioning
CN101441631A (en) * 2007-11-19 2009-05-27 上海新纳广告传媒有限公司 Data access method for asynchronous web page browsing
CN101815064A (en) * 2010-01-11 2010-08-25 北京世纪高通科技有限公司 Data interaction method and device thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
朱健等: "Ajax技术在Web开发中的应用", 《沈阳航空工业学院学报》 *
杨波: "Ajax技术在WebGIS中的应用与实践", 《中国优秀硕士学位论文全文数据库-基础科学辑》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011082629A1 (en) * 2010-01-11 2011-07-14 北京世纪高通科技有限公司 Method and device for data interaction
CN104077117A (en) * 2013-03-26 2014-10-01 联想(北京)有限公司 Information processing method and control point equipment
CN106126595A (en) * 2016-06-20 2016-11-16 浪潮电子信息产业股份有限公司 A kind of document down loading method and device
CN108540545A (en) * 2018-03-27 2018-09-14 武汉理工大学 The two-way dual asynchronous transport method of cloud computing environment spatial data based on multi-Agent
CN108540545B (en) * 2018-03-27 2020-05-08 武汉理工大学 Spatial data bidirectional double asynchronous transmission method in cloud computing environment based on multiple agents
CN109032583A (en) * 2018-07-25 2018-12-18 北京小米移动软件有限公司 Data interactive method and device
CN109032583B (en) * 2018-07-25 2022-06-17 北京小米移动软件有限公司 Data interaction method and device

Also Published As

Publication number Publication date
WO2011082629A1 (en) 2011-07-14

Similar Documents

Publication Publication Date Title
US7870482B2 (en) Web browser extension for simplified utilization of web services
DE60108158T2 (en) ONLINE DEVELOPMENT OF APPLICATIONS
DE60121987T2 (en) Accessing data stored at an intermediate station from a service
US9888088B2 (en) Method and apparatus for accessing an enterprise resource planning system via a mobile device
US11677809B2 (en) Methods for transforming a server side template into a client side template and devices thereof
CN112286513A (en) Visual design method and device based on component metadata
CN103412890A (en) Webpage loading method and device
CN107545058B (en) A kind of page loading method, server and browser
CN107967143A (en) Obtain the methods, devices and systems of the update instruction information of client application source code
CN103577596A (en) Keyword searching method and device based on current browse webpage
CN101815064A (en) Data interaction method and device thereof
CN103873918A (en) Picture processing method, device and terminal
CN103577197A (en) Method for achieving android application program dynamic form
CN104360937A (en) Intelligent parameter checking device
CN106547683B (en) A kind of redundant code detection method and device
CN106909361A (en) Web development approaches and device based on masterplate engine
CN102098330A (en) Method, device and system for asynchronous transmission based on json data format
CN101957756A (en) System and method for rapidly generating intelligent mobile terminal program
CN111859236A (en) Server rendering page generation method and system based on dynamic form verification
CN103559304A (en) Implementation method and device for Internet data customization
CN104899212A (en) Webpage display method, server and system
CN114297544A (en) Remote browsing method, device, equipment and storage medium
CN1620060B (en) Method and device for integrating browser-incompatible information into web content and for displaying the information
CN101964742A (en) Method, system and device for using network open ability
CN112947900A (en) Web application development method and device, server and development terminal

Legal Events

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

Application publication date: 20100825

RJ01 Rejection of invention patent application after publication