CN109670126B - Cross-border access acceleration method and device - Google Patents

Cross-border access acceleration method and device Download PDF

Info

Publication number
CN109670126B
CN109670126B CN201811428645.XA CN201811428645A CN109670126B CN 109670126 B CN109670126 B CN 109670126B CN 201811428645 A CN201811428645 A CN 201811428645A CN 109670126 B CN109670126 B CN 109670126B
Authority
CN
China
Prior art keywords
website
overseas
static
converted
caching
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.)
Active
Application number
CN201811428645.XA
Other languages
Chinese (zh)
Other versions
CN109670126A (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.)
Guangdong Nice Smart Technology Co ltd
Original Assignee
Guangdong Nice Smart Technology 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 Guangdong Nice Smart Technology Co ltd filed Critical Guangdong Nice Smart Technology Co ltd
Priority to CN201811428645.XA priority Critical patent/CN109670126B/en
Publication of CN109670126A publication Critical patent/CN109670126A/en
Application granted granted Critical
Publication of CN109670126B publication Critical patent/CN109670126B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to a cross-border access acceleration method and a cross-border access acceleration device, which are used for realizing the following steps: when an internal user accesses an oversea website, acquiring oversea website data accessed by the user, wherein the website data is a website code; converting the link address of the static resource in the overseas website data, and caching the converted static resource to a transfer server; and when the domestic user visits the corresponding foreign website again, loading the corresponding static resource from the transit server through the converted link address of the website. The invention has the beneficial effects that: the loading speed of accessing the static resources of the overseas website is improved.

Description

Cross-border access acceleration method and device
Technical Field
The invention relates to a cross-border access acceleration method and device, and belongs to the field of computers.
Background
At present, a plurality of websites are stored in an overseas server, and when a domestic user visits the websites, the connection speed is slow due to the problem of import and export bandwidth lines.
Disclosure of Invention
The invention provides a cross-border access accelerating method and device, and relates to a system for accelerating access to static resources such as pictures, CSS (cascading style sheets), JS (JS) and the like of a overseas website without using mirror image service when the overseas website is accessed.
The technical scheme of the invention comprises a cross-border access acceleration method, which is characterized by comprising the following steps: A. when an internal user accesses an oversea website, acquiring oversea website data accessed by the user, wherein the website data is a website code; B. converting the link address of the static resource in the overseas website data, and caching the converted static resource to a transfer server; C. and when the domestic user visits the corresponding foreign website again, loading the corresponding static resource from the transit server through the converted link address of the website.
According to the cross-border access acceleration method, the step A specifically comprises the following steps: detecting an overseas website accessed by a user, and acquiring an address of the overseas website; and setting a corresponding plug-in at a corresponding overseas website, and acquiring the static resource link and the corresponding static resource data of the website.
According to the cross-border access acceleration method, a plug-in is an Nginx plug-in.
According to the cross-border access acceleration method, the step B specifically comprises the following steps: loading HTML codes, and converting link addresses of static resources in the codes, wherein the converted link addresses of the static resources comprise but are not limited to pictures, cascading style sheets and JS scripts, the conversion comprises adding link addresses for jumping to a transit server in the static resources, and correspondingly, the conversion also comprises caching the static resources to the transit server.
According to the cross-border access acceleration method, the step B of converting the link address of the static resource in the code specifically includes: integrating the cascading style sheet code segments in the HTML codes into a cascading style sheet file, and caching the cascading style sheet file in an internal transit server; integrating JS script code segments in the HTML codes into a JS file, and caching the JS file in a domestic transit server; and converting and caching the picture resources loaded in the cascading style sheet file in a domestic transfer server.
According to the cross-border access acceleration method, the step B specifically comprises the following steps: when the system is used for visiting the corresponding foreign websites again, the converted HTML codes are loaded, and the cached static resources are directly loaded from the internal server.
In a preferred embodiment, the method further comprises: and monitoring the converted website, and if the website content is changed, acquiring the changed static link to perform corresponding address conversion and static resource caching, wherein the monitoring time interval can be set in a user-defined manner.
In a preferred embodiment, the method further comprises: and the user-defined setting obtains the static resources of the converted overseas website, and deletes the static resources cached in the history after the cache of the static resources is updated.
The technical scheme of the invention also comprises cross-border access acceleration for executing any method, and the device comprises a Web memory, a transfer memory, a Web processor and a transfer processor, and is characterized in that: the Web processor is used for acquiring the data of the overseas website accessed by the user when the overseas website is accessed by the domestic user, wherein the website data is a website code, converting the link address of the static resource in the overseas website data, and caching the converted static resource to the transfer server; the Web memory is used for storing data acquired by the overseas website; the transit processor is used for loading corresponding static resources from the transit server through the converted link address of the website when the domestic user visits the corresponding overseas website again; the transit storage is used for caching the converted static resources of the overseas website.
The invention has the beneficial effects that: the loading speed of accessing the static resources of the overseas website is improved.
Drawings
Fig. 1 shows a general flow chart of the method according to the invention.
Fig. 2 shows a flow chart according to a first embodiment of the invention.
Fig. 3 shows a schematic view of the device according to the invention.
Detailed Description
The conception, the specific structure and the technical effects of the present invention will be clearly and completely described in conjunction with the embodiments and the accompanying drawings to fully understand the objects, the schemes and the effects of the present invention.
It should be noted that, unless otherwise specified, when a feature is referred to as being "fixed" or "connected" to another feature, it may be directly fixed or connected to the other feature or indirectly fixed or connected to the other feature. Furthermore, the descriptions of upper, lower, left, right, etc. used in the present disclosure are only relative to the mutual positional relationship of the constituent parts of the present disclosure in the drawings. As used in this disclosure, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Furthermore, unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any combination of one or more of the associated listed items.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element of the same type from another. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of the present disclosure. The use of any and all examples, or exemplary language ("e.g.," such as "or the like") provided herein, is intended merely to better illuminate embodiments of the invention and does not pose a limitation on the scope of the invention unless otherwise claimed.
Fig. 1 shows a general flow chart of the method according to the invention. The method specifically comprises the following steps: A. when an internal user accesses an oversea website, acquiring oversea website data accessed by the user, wherein the website data is a website code; B. converting the link address of the static resource in the overseas website data, and caching the converted static resource to a transfer server; C. and when the domestic user visits the corresponding foreign website again, loading the corresponding static resource from the transit server through the converted link address of the website.
Fig. 2 shows a flow chart according to a first embodiment of the invention. The method specifically comprises the following steps:
(1) installing a conversion plug-in on a server of the overseas website;
(2) accessing the website through the visitor to acquire a website HTML code;
(3) converting link addresses of static resources such as pictures, CSS and JS in the HTML codes;
(4) caching the static resources through a domestic static resource transfer server;
(5) integrating the CSS code segments in the HTML codes into a CSS file, and caching the CSS file in a domestic transfer server;
(6) integrating JS code segments in the HTML codes into a JS file, and caching the JS file in a domestic transit server;
(7) converting and caching the picture resources loaded in the CSS file in a domestic transit server;
(8) the visitor loads the converted HTML code;
(9) and the visitor directly loads the static resource from the domestic transit server.
The method comprises the following steps:
converting the picture address in the html code, such as < img src ═ 1.jpg '>, to < img src ═ http:// cdn. NICecdn. com/test.com/1. jpg' >;
converting CSS file address conversion in the html code, such as < link href ═ 1.CSS '>, into < link href ═ http:// cdn.nicancedcn.com/test.com/1. CSS' >;
converting the JS file address in the html code, such as < script src ═ 1.JS >, into < script src ═ http:// cdn.niceden.com/test.com/1.JS >;
in the domestic transit server, the nginx builds service, can cache the static resources to the domestic server, and when domestic visitors load the static resources from the domestic transit server, the speed is faster than that of overseas;
the CSS code segments in the HTML codes are integrated into CSS files, so that the volume capacity of HTML codes can be reduced, the HTML codes are cached in a domestic transfer server, and the CSS code segments can be quickly loaded out;
js code segments in HTML codes are integrated into js files, so that the volume capacity of HTML codes can be reduced, and the HTML codes are cached in a domestic transfer server and can be quickly loaded out;
the cache duration can be freely set by updating the cache, such as 1 day, 7 days, 1 month, 1 hour, and the like, and is minimum 1 hour.
The server plug-in at the overseas website can also determine whether the static resource has an update, if so, the cache of the resource file is emptied, for example, if 1.jpg has an update, the conversion address is added with a timestamp to change to < img src ═ http:// cdn.
Fig. 3 shows a schematic view of the device according to the invention. The method comprises the following steps: the Web processor is used for acquiring the data of the overseas website accessed by the user when the overseas website is accessed by the domestic user, wherein the website data is a website code, converting the link address of the static resource in the overseas website data, and caching the converted static resource to the transfer server; the Web memory is used for storing data acquired by the overseas website; the transit processor is used for loading corresponding static resources from the transit server through the converted link address of the website when the domestic user visits the corresponding overseas website again; the transit storage is used for caching the converted static resources of the outbound website.
It should be recognized that embodiments of the present invention can be realized and implemented by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer readable memory. The methods may be implemented in a computer program using standard programming techniques, including a non-transitory computer-readable storage medium configured with the computer program, where the storage medium so configured causes a computer to operate in a specific and predefined manner, according to the methods and figures described in the detailed description. Each program may be implemented in a high level procedural or object oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language. Furthermore, the program can be run on a programmed application specific integrated circuit for this purpose.
Further, the operations of processes described herein can be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described herein (or variations and/or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) collectively executed on one or more processors, by hardware, or combinations thereof. The computer program includes a plurality of instructions executable by one or more processors.
Further, the method may be implemented in any type of computing platform operatively connected to a suitable interface, including but not limited to a personal computer, mini computer, mainframe, workstation, networked or distributed computing environment, separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, and the like. Aspects of the invention may be embodied in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, optically read and/or write storage medium, RAM, ROM, or the like, such that it may be read by a programmable computer, which when read by the storage medium or device, is operative to configure and operate the computer to perform the procedures described herein. Further, the machine-readable code, or portions thereof, may be transmitted over a wired or wireless network. The invention described herein includes these and other different types of non-transitory computer-readable storage media when such media include instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. The invention also includes the computer itself when programmed according to the methods and techniques described herein.
A computer program can be applied to input data to perform the functions described herein to transform the input data to generate output data that is stored to non-volatile memory. The output information may also be applied to one or more output devices, such as a display. In a preferred embodiment of the invention, the transformed data represents physical and tangible objects, including particular visual depictions of physical and tangible objects produced on a display.
The above description is only a preferred embodiment of the present invention, and the present invention is not limited to the above embodiment, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present invention should be included in the protection scope of the present invention as long as the technical effects of the present invention are achieved by the same means. The invention is capable of other modifications and variations in its technical solution and/or its implementation, within the scope of protection of the invention.

Claims (3)

1. A cross-border access acceleration method, characterized in that the method comprises the steps of:
A. when an internal user accesses an overseas website, acquiring overseas website data accessed by the user, wherein the website data is a website code, and the step A specifically comprises the following steps: detecting an overseas website accessed by a user, and acquiring an address of the overseas website; setting a corresponding plug-in at a corresponding overseas website, and acquiring a static resource link and corresponding static resource data of the website;
B. converting a link address of a static resource in overseas website data, and caching the converted static resource to a transfer server, wherein the method specifically comprises the following steps: integrating the cascading style sheet code segments in the HTML codes into a cascading style sheet file, and caching the cascading style sheet file in an internal transit server; integrating JS script code segments in the HTML codes into a JS file, and caching the JS file in a domestic transit server; converting and caching the picture resources loaded in the cascading style sheet file in a domestic transfer server; loading HTML codes, and converting link addresses of static resources in the codes, wherein the converted link addresses of the static resources comprise but are not limited to pictures, cascading style sheets and JS scripts, the conversion comprises adding link addresses jumping to a transit server in the static resources, and correspondingly, the conversion also comprises caching the static resources to the transit server; when the corresponding overseas website is accessed again, the converted HTML codes are loaded, and the cached static resources are directly loaded from the internal server;
C. when the domestic user accesses the corresponding overseas website again, loading the corresponding static resource from the transfer server through the converted link address of the website;
D. monitoring the converted website, and if the website content is changed, acquiring a changed static link to perform corresponding address conversion and static resource caching, wherein the monitoring time interval can be set in a user-defined manner; and the user-defined setting obtains the static resources of the converted overseas website, and deletes the static resources cached in the history after the cache of the static resources is updated.
2. The cross-border access acceleration method of claim 1, characterized in that the plug-in is a Nginx plug-in.
3. A cross-border access acceleration apparatus for performing the method of any one of claims 1 to 2, the apparatus comprising a Web memory, a transit memory, a Web processor, and a transit processor, wherein:
the Web processor is used for acquiring the data of the overseas website accessed by the user when the overseas website is accessed by the domestic user, wherein the website data is a website code, converting the link address of the static resource in the overseas website data, and caching the converted static resource to the transfer server;
the Web memory is used for storing data acquired by the overseas website;
the transit processor is used for loading corresponding static resources from the transit server through the converted link address of the website when the domestic user visits the corresponding overseas website again;
the transit storage is used for caching the converted static resources of the overseas website.
CN201811428645.XA 2018-11-27 2018-11-27 Cross-border access acceleration method and device Active CN109670126B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811428645.XA CN109670126B (en) 2018-11-27 2018-11-27 Cross-border access acceleration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811428645.XA CN109670126B (en) 2018-11-27 2018-11-27 Cross-border access acceleration method and device

Publications (2)

Publication Number Publication Date
CN109670126A CN109670126A (en) 2019-04-23
CN109670126B true CN109670126B (en) 2021-04-13

Family

ID=66143232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811428645.XA Active CN109670126B (en) 2018-11-27 2018-11-27 Cross-border access acceleration method and device

Country Status (1)

Country Link
CN (1) CN109670126B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111835812B (en) * 2019-11-13 2023-01-31 厦门雅基软件有限公司 Global data acquisition method and device, electronic equipment and computer storage medium
CN112615908B (en) * 2020-12-08 2023-04-18 广东荣文科技集团有限公司 Webpage processing method, electronic equipment and related product
CN114765580B (en) * 2020-12-30 2023-11-03 腾讯科技(深圳)有限公司 Network acceleration method, device, equipment and storage medium for off-domain network resources

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103885982A (en) * 2012-12-24 2014-06-25 张峰 NET one-stop navigation and search engine system and guidance method thereof
US9503333B2 (en) * 2013-08-08 2016-11-22 Level 3 Communications, Llc Content delivery methods and systems
CN104133685B (en) * 2014-08-05 2017-10-31 广州唯品会网络技术有限公司 The method and system of Website front-end exploitation
CN104360884A (en) * 2014-11-18 2015-02-18 久邦计算机技术(广州)有限公司 Plug-in resource packet loading method based on Android system
US10205797B2 (en) * 2014-12-29 2019-02-12 Facebook, Inc. Application service delivery through an application service avatar
CN106921703B (en) * 2015-12-25 2020-11-27 阿里巴巴集团控股有限公司 Cross-border data synchronization method and system, and domestic and overseas data centers
CN107229633A (en) * 2016-03-24 2017-10-03 北京神州泰岳软件股份有限公司 Static page generation method, Web access method and device
CN107590145A (en) * 2016-07-06 2018-01-16 北京神州泰岳软件股份有限公司 A kind for the treatment of method and apparatus of page static resource

Also Published As

Publication number Publication date
CN109670126A (en) 2019-04-23

Similar Documents

Publication Publication Date Title
US9652314B2 (en) Dynamic application programming interface publication for providing web services
US8301645B1 (en) Aggregated web analytics request systems and methods
US9426200B2 (en) Updating dynamic content in cached resources
CN109670126B (en) Cross-border access acceleration method and device
US8577827B1 (en) Network page latency reduction using gamma distribution
KR20130061725A (en) Exposing resource capabilities to web applications
CN105373397A (en) Specialized app development and deployment system and method
CN107798064B (en) Page processing method, electronic device and computer readable storage medium
US10015253B2 (en) System and method for preemptive request processing
US9529568B1 (en) Systems and methods for low interference logging and diagnostics
US20180102997A1 (en) Payload description for computer messaging
CN112765023A (en) Test case generation method and device
US9571557B2 (en) Script caching method and information processing device utilizing the same
CN108280174A (en) Front end file construction method and server, page access method and terminal
US10761935B2 (en) Accelerating system dump capturing
US10423472B2 (en) System and method for providing extended javascript object notation (JSON) remote procedure call (RPC) with mediator
CN111079048A (en) Page loading method and device
CN104954363A (en) Method and device for generating interface document
CN112818270B (en) Data cross-domain transfer method and device and computer equipment
CN112672187B (en) Page generation method and device, computer equipment and readable storage medium
US10860193B2 (en) Distributed computing transition screen display based on application type
CN111443992B (en) Docker mirror image difference derivation method, computer storage medium and electronic device
US20180102996A1 (en) Payload description for computer messaging
JP5643449B1 (en) Server and method for displaying display screen on terminal device
CN114035864A (en) Interface processing method, interface processing device, electronic device, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant