CN105069058B - Network map for high frequency interactive environment requests fast response method - Google Patents

Network map for high frequency interactive environment requests fast response method Download PDF

Info

Publication number
CN105069058B
CN105069058B CN201510445959.0A CN201510445959A CN105069058B CN 105069058 B CN105069058 B CN 105069058B CN 201510445959 A CN201510445959 A CN 201510445959A CN 105069058 B CN105069058 B CN 105069058B
Authority
CN
China
Prior art keywords
network map
network
request
map
request queue
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.)
Expired - Fee Related
Application number
CN201510445959.0A
Other languages
Chinese (zh)
Other versions
CN105069058A (en
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.)
Shandong Zhongdi University Ecological Environment Research Institute Co ltd
Original Assignee
China University of Geosciences
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 China University of Geosciences filed Critical China University of Geosciences
Priority to CN201510445959.0A priority Critical patent/CN105069058B/en
Publication of CN105069058A publication Critical patent/CN105069058A/en
Application granted granted Critical
Publication of CN105069058B publication Critical patent/CN105069058B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Abstract

The invention discloses a kind of network maps for high frequency interactive environment to request fast response method, and this approach includes the following steps:Initialize browser map display window;Obtain the maximum network connection number c of browser;It creates and starts c network map request queue processing thread;Calculate the map image number t for needing to render in network map window;Network map request is added to the end of network map request queue;The network map not loaded request is selected from network map request queue;Send network map image request;Network map image state is set for stress state, and shows map image.The present invention can be according to browser to the number of the limitation control network map concurrent request of number of network connections, and can automatic rejection it is invalid network map request, adapt to the fast browsing of high frequency interactive environment lower network map, especially under low-bandwidth network environment, the quick response of the network map request under high frequency interactive environment can be realized.

Description

Network map for high frequency interactive environment requests fast response method
Technical field
The present invention relates to hiperspace computing techniques more particularly to a kind of network map for high frequency interactive environment to ask Seek fast response method.
Background technique
The quick response of high frequency interactive environment lower network such map requests is one of the problem for needing to solve in WebGIS, especially It is under low broadband network environment, the response speed of network map request directly affects progress map view operation in a browser User experience.Major browsers are all restricted to the map image concurrent request number under same domain name at present, in order to improve ground Figure image concurrent request number, reduces network map request response time, and the mapping service providers such as Google, Baidu, day map are equal 8 domain names are used to increase the concurrent request number of browser, but under high frequency interactive environment, a large amount of network map image is asked Asking still cannot quickly be responded, and especially in low-bandwidth network environment, the page response time can be longer, it is difficult to meet The demand of user, a large amount of invalid network map requests are sent to server end, waste valuable bandwidth resources;Another party Face, increasing domain name not only will increase the complexity of network map client realization, but also at high cost, difficult in maintenance, access multiple Domain name can also additionally increase the time overhead of domain name mapping.
Summary of the invention
The technical problem to be solved in the present invention is that for the defects in the prior art, providing a kind of for high frequency interaction ring The network map in border requests fast response method.
The technical solution adopted by the present invention to solve the technical problems is:A kind of network map for high frequency interactive environment Fast response method is requested, is included the following steps:
Step 1) initializes browser map display window, and the pixels tall and pixel wide of network map window is arranged;
The maximum network connection number c of step 2) acquisition browser;
Step 3) creates and starts c network map request queue processing thread;
Step 4) calculates according to the pixels tall and pixel wide of network map window and needs to render in network map window Map image number t;
Step 5) creates network map request queue;
Step 6) circulation creation network map Image control, is rendered using blank image;
The status attribute that network map image is arranged in step 7) is unloaded state;
Step 8) judges whether the length of network map request queue is less than t, if it is, network map is requested to be added To the end of network map request queue;If not, deleting the first item in network map request queue, then network map is asked Ask the end for being added to network map request queue;
Step 9) network map request queue handles thread loops and calculates in network map request queue in stress state Network map number of request u, judge whether u is less than c, if it is, entering step 10);If it is not, then repeating step 9) again Calculate u;
Step 10) selects the network map not loaded request from network map request queue;
The state that the network map request selected is arranged in step 11) is stress state;
Step 12) sends network map image request;
Step 13) request is completed, and setting network map image state is stress state, and shows map image.
According to the above scheme, map image number t, t=(the w/pw+1) (h/ for needing to render in the network map window ph+1);
Wherein, h is the pixels tall of network map window, and w is the pixel wide of network map window, and ph is single map The pixels tall of image, pw are the pixel wide of single map image.
According to the above scheme, the network map request for selecting state in the step 10) not load is to select in order.
The beneficial effect comprise that:The method of the present invention can control the quantity of network map request, automatically pick Except invalid network map is requested, the quick response of high frequency interactive environment lower network such map requests is realized, save valuable bandwidth Resource especially contributes to promote low strap wide screen to support the Map Service of Network performance boost of high concurrent to provide technical support The capability of fast response of network environment lower network Map Services.
Detailed description of the invention
Present invention will be further explained below with reference to the attached drawings and examples, in attached drawing:
Fig. 1 is the method flow diagram of the embodiment of the present invention;
Fig. 2 is method flow diagram of the present invention by taking network map request quick response in Chrome browser as an example.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to embodiments, to the present invention It is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, is not used to limit The fixed present invention.
As shown in Figure 1, a kind of high frequency interactive environment lower network such map requests fast response method, includes the following steps:
Step 1) initializes browser map display window, and the pixels tall h and picture of network map visualization window is arranged Plain width w;
The maximum network connection number c of step 2) acquisition browser;
Step 3) calls the setInterval function creation in javascript and starts c network map request queue Handle thread;
Step 4) calculates needs in map window according to the pixels tall ph and pixel wide pw of w, h and single map image The map image number (t) of rendering, wherein t=(w/pw+1) (h/ph+1);
Step 5) utilizes Array class new Array, creates network map request queue;
Step 6) circulation creation network map Image control, renders it using blank image;
The status attribute of step 7) setting network map image is not load (unload) state;
Step 8) judges whether the length of network map request queue is less than t, if it is, network map is requested to be added Into network map request queue;If it is not, then entering step 9);
Step 9) deletes the first item in network map request queue, then network map request is added to network map and is asked Ask the end in queue;
Step 10) network map request queue handles thread loops and calculates in network map request queue in stress state The network map number of request (u) of (i.e. status attribute is loading), judges whether u is less than c, if it is, entering step 11);If it is not, then repeating step 10) recalculates u;
Step 11) selects a status attribute to request for the network map of unload from network map request queue;
The status attribute of the network map request selected is arranged to load (loading) state in step 12);
Step 13) sends network map image request;
Step 14) request is completed, and the status attribute of setting network map image is to have loaded (loaded) state, and show Pictorial map image, when the status attribute of all-network map image is loaded, processing terminate for network map request.
The present invention is most obvious advantage is that by step 8 to step 11, with can controlling high frequency interactive environment lower network The quantity for scheming request, the invalid network map request of automatic rejection in high frequency interaction, with realizing high frequency interactive environment lower network Scheme the quick response of request, and helps to save valuable bandwidth resources under low-bandwidth network environment.
Embodiment one:
In order to more clearly illustrate thought of the invention, 2 asked with reference to the accompanying drawing with network map in Chrome browser The quick response asked is further detailed for embodiment, and in this embodiment, network map display window width is set as 1280 pixels, are highly set as 1024 pixels, and single network map image width and height are 256 pixels, using browsing Map is quickly amplified to the 16th grade of operation from 3rd level as the implementation of network map high frequency interaction scenarios step by step in device Example.Its network map requests fast response method, and specific step is as follows:
Step 200), initialization Chrome browser map display window, are arranged the width of network map visualization window 1280 pixels are highly 1024 pixels;
Step 201) obtains browser type, is Chrome browser, and maximum network connection number is 6, therefore will most Big network such map requests number is set as 6;
SetInterval function in step 202), recursive call javascript 6 times, creates and with starting 6 networks Figure request queue handles thread;
Step 203), wide and individually map image the height width of height according to the map visualization window being arranged in step 200 Calculate map image the number t, t=(1280/256+1) for needing to render in map window under each map denotation rank (1024/256+1)=30;
Step 204) utilizes Array class new Array, creation network map request queue;
Step 205), user carry out map interactive operation by mouse or keyboard in a browser, whenever map denotation model It encloses when changing, circulation creates new need network map Image control to be shown, the img object in html is generated, in order to It prevents it from sending network request immediately, first it is rendered using blank image;
Step 206), the status attribute that each network map image is arranged are not load (unload) state;
Step 207) judges the length of network map request queue whether less than 30, if it is, network map is requested It is added in network map request queue;If it is not, then entering step 208);
First item in step 208), deletion network map request queue, then with being added to network by network map request The end of figure request queue;
Step 209), 6 network map request queue processing threads are distinguished in cycle calculations network map request queue In the network map number of request (u) of stress state (i.e. status attribute be loading), judge u whether less than 6, if it is, It enters step 210);If it is not, then repeating step 209) recalculates u;
Step 210) selects a status attribute to ask for the network map of unload from network map request queue It asks;
The status attribute of the network map request selected is arranged to load (loading) state in step 211);
Step 212) sends network map image request;
Step 213), request are completed, and the status attribute of network map image is arranged to have loaded (loaded) state, and Show map image, when the status attribute of all-network map image is loaded, processing terminate for network map request.
Under user's high frequency interactive environment, which can control first network map in step 207 and step 208 and ask The quantity for asking queue, in high-frequency operation map, old invalid network map request can guarantee network map by automatic rejection Number of request in request queue is consistent with network map amount of images to be shown is currently needed.On the other hand, the embodiment The number of concurrent that can be requested network map in step 209 and step 210 controls, and is controlled the maximum web in browser Within network connection number, to avoid more invalid network map image requests is transmitted across to server, thus in high frequency interaction ring Valuable bandwidth resources are saved under border.In the high frequency interactive application scene of the present embodiment, if being asked using traditional network map Method is sought, one meets transmission (16-3+1) * 30=420 network map image request together, and uses the method for the present invention, can only send out 30 network map image requests are sent, to realize the quick response of the network map request under high frequency interactive environment, especially Under low-bandwidth network environment, method provided by the invention has great importance for saving valuable bandwidth resources.
It should be understood that for those of ordinary skills, it can be modified or changed according to the above description, And all these modifications and variations should all belong to the protection domain of appended claims of the present invention.

Claims (2)

1. the network map for high frequency interactive environment requests fast response method, which is characterized in that include the following steps:
1)Browser map display window is initialized, the pixels tall and pixel wide of network map window are set;
2)Obtain the maximum network connection number c of browser;
3)It creates and starts c network map request queue processing thread;
4)According to the pixels tall and pixel wide of network map window, the Map for needing to render in network map window is calculated As number t;Step 4)Map image the number t, t for needing to render in middle network map window=(w/pw+1) (h/ph+1);
Wherein, h is the pixels tall of network map window, and w is the pixel wide of network map window, and ph is single map image Pixels tall, pw be single map image pixel wide;
5)Create network map request queue;
6)Circulation creation network map Image control, is rendered using blank image;
7)The status attribute that network map image is arranged is unloaded state;
8)Judge whether the length of network map request queue is less than t, if it is, with being added to network by network map request The end of figure request queue;If not, deleting the first item in network map request queue, then network map request is added to The end of network map request queue;
9)Network map request queue handles thread loops with calculating the network that stress state is in network map request queue Figure number of request u, judges whether u is less than c, if it is, entering step 10);If it is not, then repeating step 9)Recalculate u;
10)The network map for a state being selected from network map request queue not load is requested;
11)The state that the network map request selected is arranged is stress state;
12)Send network map image request;
13)Request is completed, and setting network map image state is stress state, and shows map image.
2. fast response method according to claim 1, which is characterized in that the step 10)It is middle to select state not add The network map request of load is to select in order.
CN201510445959.0A 2015-07-24 2015-07-24 Network map for high frequency interactive environment requests fast response method Expired - Fee Related CN105069058B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510445959.0A CN105069058B (en) 2015-07-24 2015-07-24 Network map for high frequency interactive environment requests fast response method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510445959.0A CN105069058B (en) 2015-07-24 2015-07-24 Network map for high frequency interactive environment requests fast response method

Publications (2)

Publication Number Publication Date
CN105069058A CN105069058A (en) 2015-11-18
CN105069058B true CN105069058B (en) 2018-11-27

Family

ID=54498428

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510445959.0A Expired - Fee Related CN105069058B (en) 2015-07-24 2015-07-24 Network map for high frequency interactive environment requests fast response method

Country Status (1)

Country Link
CN (1) CN105069058B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110928944B (en) * 2018-08-30 2024-04-02 阿里巴巴集团控股有限公司 Data processing method and device
CN113590410B (en) * 2021-06-20 2023-12-22 济南浪潮数据技术有限公司 Resource request method, system, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1828586A (en) * 2005-12-21 2006-09-06 泰为信息科技(上海)有限公司 Computer electronic map formation and display method based on Flash technology
CN103685309A (en) * 2013-12-26 2014-03-26 中国科学院遥感与数字地球研究所 Asynchronous request queue model oriented to map visualization tile service
CN103699670A (en) * 2013-12-30 2014-04-02 北京奇虎科技有限公司 Processing device and method for E-map tile request queues
CN103700125A (en) * 2013-12-30 2014-04-02 北京奇虎科技有限公司 Electronic map controller and electronic map control method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1828586A (en) * 2005-12-21 2006-09-06 泰为信息科技(上海)有限公司 Computer electronic map formation and display method based on Flash technology
CN103685309A (en) * 2013-12-26 2014-03-26 中国科学院遥感与数字地球研究所 Asynchronous request queue model oriented to map visualization tile service
CN103699670A (en) * 2013-12-30 2014-04-02 北京奇虎科技有限公司 Processing device and method for E-map tile request queues
CN103700125A (en) * 2013-12-30 2014-04-02 北京奇虎科技有限公司 Electronic map controller and electronic map control method

Also Published As

Publication number Publication date
CN105069058A (en) 2015-11-18

Similar Documents

Publication Publication Date Title
KR102008355B1 (en) Method and device for displaying content on same screen, and terminal device
US9621406B2 (en) Remote browsing session management
CN103782294B (en) Remote browsing session management
US10506076B2 (en) Remote browsing session management with multiple content versions
US10116487B2 (en) Management of interactions with representations of rendered and unprocessed content
US8799412B2 (en) Remote browsing session management
KR102366752B1 (en) Reducing latency in map interfaces
CN103269362B (en) The sharing method of picture local content, system and device in webpage
US9313100B1 (en) Remote browsing session management
US9166882B1 (en) Remote browsing session management
CN110572687A (en) Live broadcast source-returning aggregation method, device, system, equipment and storage medium
US9563928B1 (en) Bandwidth reduction through delivery of hardware-independent graphics commands for portions of content pages
CN103258024A (en) Method, system and device for sharing local contents of pictures in webpage
CN102918492A (en) Adaptive image rendering and use of imposter
CN104980494B (en) A kind of cloud storage download shared platform and method with local cache
CN105976420A (en) Online rendering method and system
US20200320154A1 (en) A webpage loading method, webpage loading system and server
CN105069058B (en) Network map for high frequency interactive environment requests fast response method
US9722851B1 (en) Optimized retrieval of network resources
CN109698785A (en) A kind of the real-time messages method for pushing and device of distribution high concurrent
CN105871590A (en) Client data updating method, client and server
CN108132820B (en) Dynamic picture display method, device and equipment
CN112688991B (en) Method for performing point cloud scanning operation, related apparatus and storage medium
CN104144126B (en) Method and system, the client of flow optimization are realized by image procossing
CN107153574A (en) Picture code-transferring method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200723

Address after: 430074 Wuhan Road, Hongshan, Shandong Province, Lu Lu Road, No. 388, No.

Patentee after: Wuhan in the big asset management Co.,Ltd.

Address before: 430074 Wuhan Road, Hongshan, Shandong Province, Lu Lu Road, No. 388, No.

Patentee before: CHINA University OF GEOSCIENCES (WUHAN CITY)

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210423

Address after: 274000, 500m north of East Sunan expressway, Liumin Road, industrial park, Helou office, Mudan District, Heze City, Shandong Province

Patentee after: Shandong Zhongdi University Ecological Environment Research Institute Co.,Ltd.

Address before: 430074 Wuhan Road, Hongshan, Shandong Province, Lu Lu Road, No. 388, No.

Patentee before: Wuhan in the big asset management Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20181127

Termination date: 20210724