CN116304403A - Webpage access method and device, computer equipment and storage medium - Google Patents

Webpage access method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN116304403A
CN116304403A CN202310154216.2A CN202310154216A CN116304403A CN 116304403 A CN116304403 A CN 116304403A CN 202310154216 A CN202310154216 A CN 202310154216A CN 116304403 A CN116304403 A CN 116304403A
Authority
CN
China
Prior art keywords
webpage
file
web page
data center
terminal
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
CN202310154216.2A
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.)
Shenzhen Fulin Technology Co Ltd
Original Assignee
Shenzhen Fulin 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 Shenzhen Fulin Technology Co Ltd filed Critical Shenzhen Fulin Technology Co Ltd
Priority to CN202310154216.2A priority Critical patent/CN116304403A/en
Publication of CN116304403A publication Critical patent/CN116304403A/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/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • 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
    • 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]
    • 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/04Protocols specially adapted for terminals or networks with limited capabilities; specially adapted for terminal portability
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application belongs to the technical field of clouds, and relates to a webpage access method, a webpage access device, computer equipment and a storage medium, wherein the method comprises the following steps: receiving a webpage access request initiated by a user through a terminal, wherein the webpage access request is initiated based on the domain name of a target webpage, the target webpage is provided with a plurality of different webpage versions, and the target webpage of the different webpage versions is loaded based on different webpage files and static resource files; determining a data center associated with a user based on the webpage access request, wherein the data center is used for supporting the operation of a target webpage with a preset webpage version; acquiring a webpage file matched with a data center; and sending the webpage file to the terminal so as to obtain a static resource file matched with the webpage file through the terminal, and loading the target webpage according to the webpage file and the static resource file. The method and the device realize customized webpage access for different users.

Description

Webpage access method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of cloud technologies, and in particular, to a web page access method, a web page access device, a computer device, and a storage medium.
Background
Web pages are an important medium for some institutions to provide network services, and with the advancement of globalization, service providing institutions may want to serve users around the world and meet policy regulations in different countries and regions. For this reason, the service provider may deploy different versions of content to the web page and want users in different regions to access the same domain name or URL (Un i form Resource Locator, uniform resource locator, a compact representation of the location and access method of resources available on the internet, which is the address of standard resources on the internet), see customized content, however, current web page access technology does not achieve such access.
Disclosure of Invention
The embodiment of the application aims to provide a webpage access method, a webpage access device, computer equipment and a storage medium, so that customized webpage access is realized for different users.
In order to solve the above technical problems, the embodiments of the present application provide a web page access method, which adopts the following technical schemes:
receiving a webpage access request initiated by a user through a terminal, wherein the webpage access request is initiated based on the domain name of a target webpage, the target webpage is provided with a plurality of different webpage versions, and the target webpage of the different webpage versions is loaded based on different webpage files and static resource files;
Determining a data center associated with the user based on the webpage access request, wherein the data center is used for supporting the operation of a target webpage with a preset webpage version;
acquiring a webpage file matched with the data center;
and sending the webpage file to the terminal so as to obtain a static resource file matched with the webpage file through the terminal, and loading the target webpage according to the webpage file and the static resource file.
In order to solve the above technical problems, the embodiments of the present application further provide a web page access device, which adopts the following technical scheme:
the access receiving module is used for receiving a webpage access request initiated by a user through a terminal, wherein the webpage access request is initiated based on the domain name of a target webpage, the target webpage is provided with a plurality of different webpage versions, and the target webpage of the different webpage versions is loaded based on different webpage files and static resource files;
the center determining module is used for determining a data center associated with the user based on the webpage access request, and the data center is used for supporting the operation of a target webpage with a preset webpage version;
the file acquisition module is used for acquiring a webpage file matched with the data center;
And the webpage loading module is used for sending the webpage file to the terminal, acquiring a static resource file matched with the webpage file through the terminal, and loading the target webpage according to the webpage file and the static resource file.
In order to solve the above technical problems, the embodiments of the present application further provide a computer device, which adopts the following technical schemes:
receiving a webpage access request initiated by a user through a terminal, wherein the webpage access request is initiated based on the domain name of a target webpage, the target webpage is provided with a plurality of different webpage versions, and the target webpage of the different webpage versions is loaded based on different webpage files and static resource files;
determining a data center associated with the user based on the webpage access request, wherein the data center is used for supporting the operation of a target webpage with a preset webpage version;
acquiring a webpage file matched with the data center;
and sending the webpage file to the terminal so as to obtain a static resource file matched with the webpage file through the terminal, and loading the target webpage according to the webpage file and the static resource file.
In order to solve the above technical problems, embodiments of the present application further provide a computer readable storage medium, which adopts the following technical solutions:
receiving a webpage access request initiated by a user through a terminal, wherein the webpage access request is initiated based on the domain name of a target webpage, the target webpage is provided with a plurality of different webpage versions, and the target webpage of the different webpage versions is loaded based on different webpage files and static resource files;
determining a data center associated with the user based on the webpage access request, wherein the data center is used for supporting the operation of a target webpage with a preset webpage version;
acquiring a webpage file matched with the data center;
and sending the webpage file to the terminal so as to obtain a static resource file matched with the webpage file through the terminal, and loading the target webpage according to the webpage file and the static resource file.
Compared with the prior art, the embodiment of the application has the following main beneficial effects: receiving a webpage access request initiated by a user through a terminal, wherein the webpage access request can be initiated based on the domain name of a target webpage; determining a data center associated with a user based on a webpage access request, wherein the data center can be used as a background to support the operation of a target webpage of a preset version; the target webpage is provided with a plurality of different webpage versions, and webpage files needed when the target webpage of the different webpage versions is loaded are different, so that the webpage files matched with the data center are needed to be acquired; the method comprises the steps that a webpage file is sent to a terminal, static resource files are needed when the terminal loads a target webpage, the target webpage is different in version, the static resource files are also different, the terminal obtains the static resource files matched with the webpage files, and loads the target webpage according to the webpage files and the static resource files, so that the target webpage accessed by a user according to the same domain name can be different, and customized webpage access is realized for different users.
Drawings
For a clearer description of the solution in the present application, a brief description will be given below of the drawings that are needed in the description of the embodiments of the present application, it being obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow chart of one embodiment of a web page access method according to the present application;
FIG. 3 is a schematic diagram of an embodiment of a web page access device according to the present application;
FIG. 4 is a schematic structural diagram of one embodiment of a computer device according to the present application.
Detailed Description
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 to which this application belongs; the terminology used in the description of the applications herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having" and any variations thereof in the description and claims of the present application and in the description of the figures above are intended to cover non-exclusive inclusions. The terms first, second and the like in the description and in the claims or in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
In order to better understand the technical solutions of the present application, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings.
As shown in fig. 1, the system architecture 100 may include terminals 101, 102, data centers 103, 104, a content distribution network 105, a server 106, and a network 107. The network 107 is the medium used to provide communication links between the terminals 101, 102, the data centers 103, 104, the content distribution network 105 and the server 106. The network 107 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the data centers 103, 104, the content distribution network 105, and the server 106 through the network 107 using the terminals 101, 102 to receive or send messages, etc. The terminals 101, 102 may have various communication client applications installed thereon, such as a web browser application, a shopping class application, a search class application, an instant messaging tool, a mailbox client, social platform software, and the like.
Terminals 101, 102 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablet computers, e-book readers, MP3 players (Mov i ng P i cture Expe rts G roup Aud i o Layer I I I, dynamic video expert compression standard audio plane 3), MP4 (Mov i ng P i ctur e Experts Group Aud i o Layer I V, dynamic video expert compression standard audio plane 4) players, laptop and desktop computers, and the like.
The server 105 provides an identification service for the user, and the user can initiate a web page access request through the terminals 101 and 102, and the server 106 processes the web page access request.
The data centers 103 and 104 are servers that provide various services as a background, for example, a background server that provides support for pages displayed on the terminals 101 and 102.
The content delivery network (Content De l i very Networ k, CDN) 105 may comprise a plurality of CDN nodes, each of which may store a plurality of versions of a static resource file, and provide content delivery services for the terminals.
It should be noted that, the web page access method provided in the embodiments of the present application is generally executed by a server, and accordingly, the web page access device is generally disposed in the server.
It should be understood that the number of terminals, data centers, content distribution networks, servers, and networks in fig. 1 are merely illustrative. There may be any number of terminals, data centers, content distribution networks, servers, and networks, as desired for implementation.
With continued reference to FIG. 2, a flow chart of one embodiment of a web page access method according to the present application is shown. The webpage access method comprises the following steps:
step S201, a webpage access request initiated by a user through a terminal is received, the webpage access request is initiated based on the domain name of a target webpage, the target webpage is provided with a plurality of different webpage versions, and the target webpage of the different webpage versions is loaded based on different webpage files and static resource files.
In this embodiment, the electronic device (e.g., the server shown in fig. 1) on which the web page access method operates may communicate through a wired connection or a wireless connection. It should be noted that the wireless connection may include, but is not limited to, 3G/4G/5G connections, wifi connections, bluetooth connections, wimax connections, zgbee connections, UWB (u l t ra W i deband) connections, and other now known or later developed wireless connection means.
Specifically, the target webpage may be a webpage that the user wants to access, where the target webpage has a domain name, and the user may initiate a webpage access request for the target webpage at the terminal according to the domain name, for example, the user accesses a login page of the target webpage according to the domain name, performs a login operation on the login page, and triggers the webpage access request. And the terminal sends the webpage access request to the server.
The target webpage in the application can be accessed by a user in any region of the world, the target webpage can only have one domain name, the user can initiate access to the target webpage through the domain name, however, the target webpage can have a plurality of webpage versions, the display content and webpage functions of the target webpage of different webpage versions can be different, for example, the webpage version V1.0.0 does not support picture searching, but the webpage version v2.0.0 supports picture searching. The target web page requires a web page file and a static resource file (the web page file and the static resource file are discussed in detail below) when loaded, and the web page files and the static resource files required when loading target web pages of different web page versions are also different. In the existing web page access technology, web pages accessed by different users are the same for the same domain name, and in the application, web pages accessed by different users can be different for the same domain name.
Step S202, determining a data center associated with the user based on the webpage access request, wherein the data center is used for supporting the operation of a target webpage with a preset webpage version.
Specifically, a Data center (Data center) is provided in the present application, and the Data center can be used as a background server to support the operation of the target webpage. There may be a plurality of data centers, one particular data center serving a particular user, for example, data center CN serving users from china, data center US serving users from the united states, and data center JP serving users from japan. In the above example, the data center is bound to the region, and in one embodiment, the data center may also be bound to the users, where the users are classified according to non-regional factors, and different data centers provide services for different types of users, for example, the data center U1 provides services for class 1 users and the data center U2 provides services for class 2 users.
The target webpage can have multiple webpage versions, and the display content of the target webpage with different versions can be different from the webpage functions. There may be differences in the versions of the target web page supported by different data centers, for example, data center US supports version v2.0.0 of the target web page and data center JP supports version V1.0.0 of the target web page.
After receiving the webpage access request, the server can determine the data center associated with the user according to preset configuration information.
Further, the step S202 may include: extracting user information from the webpage access request; acquiring a pre-established registration list; and inquiring in the registration registry according to the user information to obtain the data center associated with the user.
Specifically, the server may provide an identification service (I dense I ty-Ser v I ce), and after receiving the web page access request, extract user information from the web page access request, where the user information refers to information related to user access, and may include a user identifier, a user login address, and so on.
Then, a registration registry is obtained, and the registration registry records the data center associated with the user; the registration list is pre-generated, and can record the corresponding relation between the user login address and the data center, or record the user category to which the user identifier belongs and record the corresponding relation between the user category and the data center when the user is successfully registered.
And inquiring in the registration registry according to the user information to obtain the data center associated with the user.
In a preferred embodiment, the data center provides services to users by region and queries the data center associated with the user based on the user login address in the user information.
In this embodiment, user information is extracted from a web page access request, where the user information is information related to user access; the registration registry is obtained, the data centers related to the user are queried in the registration registry according to the user information, and different data centers support the operation of target web pages of different versions, so that the subsequent customized web page access for the user is ensured.
Step S203, a web page file matched with the data center is acquired.
Specifically, the web page file is a file required for loading the target web page by the terminal, and may be an index file, that is, a top page file of the target web page, where html refers to a technical specification for writing a hypertext (HyperTextMar kupLanguage) file, and index is meant as a directory, and the technical field of web pages is also called a navigation directory.
The display content and the web page function of the different versions of the target web page may be different, so that the web page files required by the different versions of the target web page are also different. There may be differences in the versions of the target web page supported by different data centers, and thus, it is necessary to generate a web page file matching the data center according to the data center with which the user is associated.
Step S204, the webpage file is sent to the terminal, so that the static resource file matched with the webpage file is obtained through the terminal, and the target webpage is loaded according to the webpage file and the static resource file.
Specifically, the server transmits the web page file to the terminal. When a browser in the terminal loads a target webpage, static resource files which are dependent in the webpage files are required to be acquired besides the webpage files. The static resource file comprises static resources such as JavanScr i pt, css, pictures and the like. Because the display content of the target pages of different versions may be different from the webpage functions, the static resource files on which different webpage files depend also have differences. The terminal needs to acquire a static resource file matched with the webpage file, and then loads a target webpage according to the webpage file and the static resource file.
Further, after the step S204, the method may further include: and receiving an interaction request triggered by the user in the target webpage through the data center, and responding to the interaction request through the data center.
Specifically, after the target webpage is loaded successfully, the user can access the target webpage and perform user operation, so that the interaction request is triggered. The terminal may interact with the data center through XMLHttpRequest (XHR) objects, and in XMLHttpRequest, the base URL (that is, a common or identical prefix in multiple URLs) needs to be configured to set the base URL to the domain name of the associated data center, for example, for a user in the United States (US), the base URL may be set to US. The data center responds to the interaction request, and response data can be sent to the terminal, or data related to the user can be stored in the data center according to the interaction request, so that correct storage of the user data is realized.
In this embodiment, the data center receives an interaction request triggered by the user in the target webpage, and the data center responds to the interaction request to realize the access of the user to the target webpage.
In this embodiment, a web page access request initiated by a user through a terminal is received, where the web page access request may be initiated based on a domain name of a target web page; determining a data center associated with a user based on a webpage access request, wherein the data center can be used as a background to support the operation of a target webpage of a preset version; the target webpage is provided with a plurality of different webpage versions, and webpage files needed when the target webpage of the different webpage versions is loaded are different, so that the webpage files matched with the data center are needed to be acquired; the method comprises the steps that a webpage file is sent to a terminal, static resource files are needed when the terminal loads a target webpage, the target webpage is different in version, the static resource files are also different, the terminal obtains the static resource files matched with the webpage files, and loads the target webpage according to the webpage files and the static resource files, so that the target webpage accessed by a user according to the same domain name can be different, and customized webpage access is realized for different users.
Further, before the step S201, the method may further include: acquiring first corresponding relation information between each data center and each webpage version number, wherein the webpage version number is used for identifying the webpage version of the target webpage; acquiring second corresponding relation information between each webpage version number and each resource version number, wherein the resource version number is used for identifying a resource version of the static resource file; and generating a matching table according to the first corresponding relation information and the second corresponding relation information.
Specifically, the target webpage has a plurality of webpage versions, and different webpage versions can be identified by webpage version numbers; different web page versions require static resource files of different resource versions, which can be identified by resource version numbers.
The server obtains first corresponding relation information between each data center and each webpage version number, obtains second corresponding relation information between each webpage version number and each resource version number, and generates a matching table according to the first corresponding relation information and the second corresponding relation information.
In one embodiment, static resource files of different resource versions are stored in a content delivery network (Content De l i very Networ k, CDN), in which web page versions of corresponding target web pages can be recorded. Accordingly, the server may extract the second correspondence information from the content distribution network.
In this embodiment, first correspondence information between each data center and each webpage version number is obtained; acquiring second corresponding relation information between each webpage version number and each resource version number; and generating a matching table according to the first corresponding relation information and the second corresponding relation information, so that the static resource file to be acquired is convenient to determine later.
Further, the step S203 may include: acquiring a pre-established matching table; inquiring a webpage version number corresponding to the data center in the matching table, and inquiring a resource version number corresponding to the webpage version number; acquiring content distribution network configuration information, wherein the content distribution network configuration information is used for acquiring static resource files corresponding to resource version numbers from a content distribution network; and adding the resource version number and the content distribution network configuration information to the initial webpage file to obtain the webpage file matched with the data center.
Specifically, the server acquires a pre-established matching table, queries a webpage version number corresponding to the data center in the matching table based on the data center associated with the user, and continuously queries a resource version number corresponding to the webpage version number.
The server also needs to acquire content distribution network configuration information, and the content distribution network configuration information records the storage status of static resource files of different resource versions in the content distribution network, and is used for acquiring the static resource files corresponding to the resource version numbers from the content distribution network. The content delivery network has a plurality of CDN nodes, information stored on each CDN node may be the same, and each node may store a plurality of versions of static resource files. And writing the resource version number and the content distribution network configuration information into the initial webpage file to obtain the webpage file matched with the data center.
In the application, the user is associated with the data center, and the data center is preconfigured with the corresponding relation with the webpage versions, so that the webpage services of different webpage versions are provided for the user. If the version upgrading or rollback of the user plane is to be realized, only the configuration of the data center is required to be modified, the webpage version corresponding to the data center is adjusted, when a user initiates a webpage access request, a webpage file is generated according to the new webpage version corresponding to the data center, and a static resource file of a resource version corresponding to the new webpage version is acquired from a content distribution network, so that the version upgrading or rollback of the user access plane can be realized.
In this embodiment, a matching table is searched for a webpage version number corresponding to the data center, and a resource version number corresponding to the webpage version number is searched for; acquiring content distribution network configuration information, wherein the content distribution network configuration information records the storage conditions of static resource files of different resource versions in a content distribution network, and can be used for acquiring the static resource files; and adding the resource version number and the content distribution network configuration information to the initial webpage file to obtain the webpage file matched with the data center, so that the terminal can realize customized webpage access according to the webpage file.
Further, the step of obtaining, by the terminal, the static resource file matched with the web page file may include: determining a nearest distribution node of the terminal in the content distribution network; and acquiring the static resource file matched with the webpage file from the nearest distribution node through the terminal.
Specifically, the content delivery network has a plurality of CDN nodes, which can be widely deployed. For example, when a target web page provides access services for users worldwide, a plurality of CDN nodes may be set in different regions around the world. When the terminal acquires the static resource file, determining the nearest CDN node in the content distribution network to obtain the nearest distribution node, and acquiring the static resource file matched with the webpage file from the nearest distribution node, thereby shortening the request link, improving the acquisition speed of the static resource, and improving the loading speed of the target webpage.
Further, the step of obtaining, by the terminal, the static resource file matching the web page file from the nearest distribution node may include: reading a resource path in the webpage file through a static module packer, wherein the resource path is generated based on a resource version number in the webpage file and content distribution network configuration information; and acquiring the static resource file matched with the webpage file from the nearest distribution node according to the resource path.
Specifically, the dependency term of the ent ry.j s in the webpage file is loaded by default according to the domain name, but the static resource file in the application is stored in the content distribution network, so that the dependent static resource file cannot be accessed according to the traditional loading mode. When the webpage file is generated, a resource path of the static resource file is generated according to the resource version number and the content distribution network configuration information, and the resource path is written into the global variable. The global variable is then read by the capability of a static module packager (i.e. weback, which is a code compilation tool with an entry, an exit, an l loader and a plug-in; weback is a static module packager for modern JavaScr i pt applications), so as to obtain a resource path, which points to the content distribution network, and the terminal can obtain a static resource file matching the web page file from the nearest distribution node according to the resource path.
In this embodiment, the terminal reads the resource path in the web page file through the static module packer, and the resource path is generated based on the resource version number in the web page file and the configuration information of the content distribution network and points to the static resource file in the content distribution network, so that the terminal can obtain the static resource file matched with the web page file from the nearest distribution node according to the resource path.
In this embodiment, the nearest distribution node of the terminal is determined in the content distribution network, and the terminal obtains the static resource file matched with the webpage file from the nearest distribution node, so as to shorten the request link, improve the obtaining speed of the static resource, and improve the loading speed of the target webpage.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by computer readable instructions stored in a computer readable storage medium that, when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-On-y Memory (ROM), or a random access Memory (Random Access Memory, RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
With further reference to fig. 3, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a web page access apparatus, where an embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 3, the web page access device 300 according to the present embodiment includes: an access receiving module 301, a center determining module 302, a file obtaining module 303, and a web page loading module 304, wherein:
the access receiving module 301 is configured to receive a web page access request initiated by a user through a terminal, where the web page access request is initiated based on a domain name of a target web page, the target web page has multiple different web page versions, and the target web page of the different web page versions is loaded based on different web page files and static resource files.
The center determining module 302 is configured to determine, based on the web page access request, a data center associated with the user, where the data center is configured to support operation of a target web page of a preset web page version.
The file obtaining module 303 is configured to obtain a web page file matched with the data center.
The web page loading module 304 is configured to send a web page file to a terminal, so as to obtain a static resource file matched with the web page file through the terminal, and load a target web page according to the web page file and the static resource file.
In this embodiment, a web page access request initiated by a user through a terminal is received, where the web page access request may be initiated based on a domain name of a target web page; determining a data center associated with a user based on a webpage access request, wherein the data center can be used as a background to support the operation of a target webpage of a preset version; the target webpage is provided with a plurality of different webpage versions, and webpage files needed when the target webpage of the different webpage versions is loaded are different, so that the webpage files matched with the data center are needed to be acquired; the method comprises the steps that a webpage file is sent to a terminal, static resource files are needed when the terminal loads a target webpage, the target webpage is different in version, the static resource files are also different, the terminal obtains the static resource files matched with the webpage files, and loads the target webpage according to the webpage files and the static resource files, so that the target webpage accessed by a user according to the same domain name can be different, and customized webpage access is realized for different users.
In some alternative implementations of the present embodiment, the center determination module 302 may include: the system comprises an information extraction sub-module, a registry acquisition sub-module and a center determination sub-module, wherein:
And the information extraction sub-module is used for extracting user information from the webpage access request.
The registration form acquisition sub-module is used for acquiring a registration form which is established in advance.
And the center determining submodule is used for inquiring in the registration table according to the user information to obtain the data center associated with the user.
In this embodiment, user information is extracted from a web page access request, where the user information is information related to user access; the registration registry is obtained, the data centers related to the user are queried in the registration registry according to the user information, and different data centers support the operation of target web pages of different versions, so that the subsequent customized web page access for the user is ensured.
In some optional implementations of the present embodiment, the web page access apparatus 300 may include: the device comprises a first acquisition module, a second acquisition module and a matching table generation module, wherein:
the first acquisition module is used for acquiring first corresponding relation information between each data center and each webpage version number, wherein the webpage version number is used for identifying the webpage version of the target webpage.
The second obtaining module is used for obtaining second corresponding relation information between each webpage version number and each resource version number, and the resource version number is used for identifying the resource version of the static resource file.
And the matching table generation module is used for generating a matching table according to the first corresponding relation information and the second corresponding relation information.
In this embodiment, first correspondence information between each data center and each webpage version number is obtained; acquiring second corresponding relation information between each webpage version number and each resource version number; and generating a matching table according to the first corresponding relation information and the second corresponding relation information, so that the static resource file to be acquired is convenient to determine later.
In some alternative implementations of the present embodiment, the file acquisition module 303 may include: the system comprises a matching table acquisition sub-module, a query sub-module, a configuration acquisition sub-module and an information adding sub-module, wherein:
and the matching table acquisition sub-module is used for acquiring a pre-established matching table.
And the inquiring sub-module is used for inquiring the webpage version number corresponding to the data center in the matching table and inquiring the resource version number corresponding to the webpage version number.
The configuration acquisition sub-module is used for acquiring content distribution network configuration information, and the content distribution network configuration information is used for acquiring static resource files corresponding to the resource version numbers from the content distribution network.
And the information adding sub-module is used for adding the resource version number and the content distribution network configuration information to the initial webpage file to obtain the webpage file matched with the data center.
In this embodiment, a matching table is searched for a webpage version number corresponding to the data center, and a resource version number corresponding to the webpage version number is searched for; acquiring content distribution network configuration information, wherein the content distribution network configuration information records the storage conditions of static resource files of different resource versions in a content distribution network, and can be used for acquiring the static resource files; and adding the resource version number and the content distribution network configuration information to the initial webpage file to obtain the webpage file matched with the data center, so that the terminal can realize customized webpage access according to the webpage file.
In some alternative implementations of the present embodiment, the web page loading module 304 may include: the node determining sub-module and the resource obtaining sub-module, wherein:
a node determination sub-module for determining the nearest distribution node of the terminal in the content distribution network.
And the resource acquisition sub-module is used for acquiring the static resource file matched with the webpage file from the nearest distribution node through the terminal.
In this embodiment, the nearest distribution node of the terminal is determined in the content distribution network, and the terminal obtains the static resource file matched with the webpage file from the nearest distribution node, so as to shorten the request link, improve the obtaining speed of the static resource, and improve the loading speed of the target webpage.
In some optional implementations of this embodiment, the resource acquisition sub-module may include: path reading unit and resource obtaining unit, wherein:
and the path reading unit is used for reading the resource path in the webpage file through the static module packer, and the resource path is generated based on the resource version number in the webpage file and the content distribution network configuration information.
And the resource acquisition unit is used for acquiring the static resource file matched with the webpage file from the nearest distribution node according to the resource path.
In this embodiment, the terminal reads the resource path in the web page file through the static module packer, and the resource path is generated based on the resource version number in the web page file and the configuration information of the content distribution network and points to the static resource file in the content distribution network, so that the terminal can obtain the static resource file matched with the web page file from the nearest distribution node according to the resource path.
In some optional implementations of the present embodiment, the web page access apparatus 300 may further include: and the interaction module is used for receiving an interaction request triggered by a user in the target webpage through the data center and responding to the interaction request through the data center.
In this embodiment, the data center receives an interaction request triggered by the user in the target webpage, and the data center responds to the interaction request to realize the access of the user to the target webpage.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 4, fig. 4 is a basic structural block diagram of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It should be noted that only computer device 4 having components 41-43 is shown in the figures, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and its hardware includes, but is not limited to, a microprocessor, an application specific integrated circuit (App l I cat I on Spec I F I C I ntegrated C I rcu I t, AS IC), a programmable gate array (Flie d-Programmab l e Gate Ar ray, FPGA), a digital processor (D I g I ta l S I gna l Processor, DSP), an embedded device, and the like.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the computer device 4. Of course, the memory 41 may also comprise both an internal memory unit of the computer device 4 and an external memory device. In this embodiment, the memory 41 is typically used to store an operating system and various application software installed on the computer device 4, such as computer readable instructions of a web page access method. Further, the memory 41 may be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute computer readable instructions stored in the memory 41 or process data, such as computer readable instructions for executing the web page access method.
The network interface 43 may comprise a wireless network interface or a wired network interface, which network interface 43 is typically used for establishing a communication connection between the computer device 4 and other electronic devices.
The computer device provided in this embodiment may perform the above-described web page access method. The web page access method here may be the web page access method of each of the above embodiments.
In this embodiment, a web page access request initiated by a user through a terminal is received, where the web page access request may be initiated based on a domain name of a target web page; determining a data center associated with a user based on a webpage access request, wherein the data center can be used as a background to support the operation of a target webpage of a preset version; the target webpage is provided with a plurality of different webpage versions, and webpage files needed when the target webpage of the different webpage versions is loaded are different, so that the webpage files matched with the data center are needed to be acquired; the method comprises the steps that a webpage file is sent to a terminal, static resource files are needed when the terminal loads a target webpage, the target webpage is different in version, the static resource files are also different, the terminal obtains the static resource files matched with the webpage files, and loads the target webpage according to the webpage files and the static resource files, so that the target webpage accessed by a user according to the same domain name can be different, and customized webpage access is realized for different users.
The present application also provides another embodiment, namely, a computer-readable storage medium storing computer-readable instructions executable by at least one processor to cause the at least one processor to perform the steps of the web page access method as described above. The computer readable storage medium may be a nonvolatile storage medium or a volatile storage medium.
In this embodiment, a web page access request initiated by a user through a terminal is received, where the web page access request may be initiated based on a domain name of a target web page; determining a data center associated with a user based on a webpage access request, wherein the data center can be used as a background to support the operation of a target webpage of a preset version; the target webpage is provided with a plurality of different webpage versions, and webpage files needed when the target webpage of the different webpage versions is loaded are different, so that the webpage files matched with the data center are needed to be acquired; the method comprises the steps that a webpage file is sent to a terminal, static resource files are needed when the terminal loads a target webpage, the target webpage is different in version, the static resource files are also different, the terminal obtains the static resource files matched with the webpage files, and loads the target webpage according to the webpage files and the static resource files, so that the target webpage accessed by a user according to the same domain name can be different, and customized webpage access is realized for different users.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), including several instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
It is apparent that the embodiments described above are only some embodiments of the present application, but not all embodiments, the preferred embodiments of the present application are given in the drawings, but not limiting the patent scope of the present application. This application may be embodied in many different forms, but rather, embodiments are provided in order to provide a more thorough understanding of the present disclosure. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing, or equivalents may be substituted for elements thereof. All equivalent structures made by the specification and the drawings of the application are directly or indirectly applied to other related technical fields, and are also within the protection scope of the application.

Claims (10)

1. A web page access method, comprising the steps of:
receiving a webpage access request initiated by a user through a terminal, wherein the webpage access request is initiated based on the domain name of a target webpage, the target webpage is provided with a plurality of different webpage versions, and the target webpage of the different webpage versions is loaded based on different webpage files and static resource files;
determining a data center associated with the user based on the webpage access request, wherein the data center is used for supporting the operation of a target webpage with a preset webpage version;
acquiring a webpage file matched with the data center;
and sending the webpage file to the terminal so as to obtain a static resource file matched with the webpage file through the terminal, and loading the target webpage according to the webpage file and the static resource file.
2. The web page access method of claim 1, wherein the step of determining the data center with which the user is associated based on the web page access request comprises:
extracting user information from the webpage access request;
acquiring a pre-established registration list;
and inquiring in the registration registry according to the user information to obtain a data center associated with the user.
3. The web page access method as recited in claim 1, further comprising, prior to the step of receiving a web page access request initiated by a user via a terminal:
acquiring first corresponding relation information between each data center and each webpage version number, wherein the webpage version number is used for identifying the webpage version of the target webpage;
acquiring second corresponding relation information between each webpage version number and each resource version number, wherein the resource version number is used for identifying a resource version of a static resource file;
and generating a matching table according to the first corresponding relation information and the second corresponding relation information.
4. The web page access method as recited in claim 3, wherein the step of obtaining a web page file that matches the data center comprises:
acquiring a pre-established matching table;
inquiring a webpage version number corresponding to the data center in the matching table, and inquiring a resource version number corresponding to the webpage version number;
acquiring content distribution network configuration information, wherein the content distribution network configuration information is used for acquiring static resource files corresponding to the resource version numbers from a content distribution network;
And adding the resource version number and the content distribution network configuration information to an initial webpage file to obtain a webpage file matched with the data center.
5. The web page access method as recited in claim 4, wherein the step of obtaining, by the terminal, the static resource file that matches the web page file comprises:
determining a nearest distribution node of the terminal in the content distribution network;
and acquiring the static resource file matched with the webpage file from the nearest distribution node through the terminal.
6. The web page access method as recited in claim 5, wherein the step of obtaining, by the terminal, a static resource file matching the web page file from the nearest distribution node comprises:
reading a resource path in the webpage file through a static module packer, wherein the resource path is generated based on the resource version number in the webpage file and the content distribution network configuration information;
and acquiring the static resource file matched with the webpage file from the nearest distribution node according to the resource path.
7. The web page access method as recited in claim 1, further comprising, after the step of transmitting the web page file to the terminal to obtain a static resource file matching the web page file through the terminal and loading the target web page according to the web page file and the static resource file:
And receiving an interaction request triggered by the user in the target webpage through the data center, and responding to the interaction request through the data center.
8. A web page access device, comprising:
the access receiving module is used for receiving a webpage access request initiated by a user through a terminal, wherein the webpage access request is initiated based on the domain name of a target webpage, the target webpage is provided with a plurality of different webpage versions, and the target webpage of the different webpage versions is loaded based on different webpage files and static resource files;
the center determining module is used for determining a data center associated with the user based on the webpage access request, and the data center is used for supporting the operation of a target webpage with a preset webpage version;
the file acquisition module is used for acquiring a webpage file matched with the data center;
and the webpage loading module is used for sending the webpage file to the terminal, acquiring a static resource file matched with the webpage file through the terminal, and loading the target webpage according to the webpage file and the static resource file.
9. A computer device comprising a memory having stored therein computer readable instructions which when executed by a processor implement the steps of the web page access method of any of claims 1 to 7.
10. A computer readable storage medium having stored thereon computer readable instructions which when executed by a processor implement the steps of the web page access method of any of claims 1 to 7.
CN202310154216.2A 2023-02-17 2023-02-17 Webpage access method and device, computer equipment and storage medium Pending CN116304403A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310154216.2A CN116304403A (en) 2023-02-17 2023-02-17 Webpage access method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310154216.2A CN116304403A (en) 2023-02-17 2023-02-17 Webpage access method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116304403A true CN116304403A (en) 2023-06-23

Family

ID=86835321

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310154216.2A Pending CN116304403A (en) 2023-02-17 2023-02-17 Webpage access method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116304403A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117270957A (en) * 2023-11-21 2023-12-22 北京名道恒通信息技术有限公司 Interface version control method, request end and server end

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117270957A (en) * 2023-11-21 2023-12-22 北京名道恒通信息技术有限公司 Interface version control method, request end and server end
CN117270957B (en) * 2023-11-21 2024-03-08 北京名道恒通信息技术有限公司 Interface version control method, request end and server end

Similar Documents

Publication Publication Date Title
US11095744B2 (en) Method, device, and system for displaying information associated with a web page
US10509841B2 (en) Inferred user identity in content distribution
CN110096660B (en) Method and device for loading page pictures and electronic equipment
US8935798B1 (en) Automatically enabling private browsing of a web page, and applications thereof
CN104049986A (en) Plugin loading method and device
CN107291759B (en) Method and device for processing browser page resources
KR20180116429A (en) Service execution method and device
CN103873918A (en) Picture processing method, device and terminal
CN110808868B (en) Test data acquisition method and device, computer equipment and storage medium
CN111355720B (en) Method, system and equipment for accessing intranet by application and computer storage medium
CN113382083B (en) Webpage screenshot method and device
TW201409273A (en) Method and Apparatus of Responding to Webpage Access Request
CN104679824A (en) Webpage generating method and webpage generating system of network platform
CN116304403A (en) Webpage access method and device, computer equipment and storage medium
KR101265164B1 (en) System for providing shorten URL browsing with branding , method thereof, and web client thereof
CN111813418B (en) Distributed link tracking method, device, computer equipment and storage medium
CN111078437B (en) Remote calling method and device for verification codes, electronic equipment and readable storage medium
CN110633432A (en) Method, device, terminal equipment and medium for acquiring data
CN112416875B (en) Log management method, device, computer equipment and storage medium
CN111240750B (en) Awakening method and device for target application program
CN110704498A (en) Data extraction method, device, equipment and computer readable storage medium
CN116382720A (en) Plug-in processing method, device, computer equipment and storage medium
CN110858238A (en) Data processing method and device
CN111104619B (en) Method for collecting articles and mobile terminal
WO2017064567A1 (en) Method, device, and system for displaying information associated with a web page

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