CN113761414A - Page data acquisition method and device - Google Patents

Page data acquisition method and device Download PDF

Info

Publication number
CN113761414A
CN113761414A CN202011125476.XA CN202011125476A CN113761414A CN 113761414 A CN113761414 A CN 113761414A CN 202011125476 A CN202011125476 A CN 202011125476A CN 113761414 A CN113761414 A CN 113761414A
Authority
CN
China
Prior art keywords
page
page data
data
source server
condition
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
CN202011125476.XA
Other languages
Chinese (zh)
Inventor
谷长征
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information 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 Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202011125476.XA priority Critical patent/CN113761414A/en
Publication of CN113761414A publication Critical patent/CN113761414A/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/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a page data acquisition method and device, and relates to the technical field of computers. One embodiment of the method comprises: receiving a data acquisition request sent by a front end of a page, wherein the data acquisition request indicates domain name information; acquiring page data from a cache corresponding to a content distribution network according to the domain name information; under the condition that the page data is not obtained from the cache, obtaining the page data from the source server; under the condition that the page data is not obtained from a source server, obtaining the page data from a backup server corresponding to the source server; and sending the page data to the front end of the page for page display. The implementation method can always acquire reliable page data, and ensures high availability of the page.

Description

Page data acquisition method and device
Technical Field
The invention relates to the technical field of computers, in particular to a page data acquisition method and device.
Background
With the proliferation of internet users, websites, especially large websites such as e-commerce, need to have high availability, i.e. users can normally access at any time.
At present, when a user requests to access a page, the user request is often sent to a content distribution network, so as to obtain corresponding page data from a source server through the content distribution network, and then perform page display.
However, in the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: when a user requests to access a page, if the network between the content distribution network and the source server shakes, page data cannot be acquired from the source server, so that the user cannot normally open the page, and user experience is influenced; if the source server is abnormal, the data cannot be acquired from the source server, or the acquired data has problems, the page cannot be displayed to the user, or the page data is displayed wrongly, so that the user experience is further reduced.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for acquiring page data, which can acquire correct and available page data for page display in one of a cache, a source server or a backup server when a source server is abnormal or a network is abnormal, so as to ensure high availability of a page and further improve experience of a page access user.
In order to achieve the above object, according to an aspect of the embodiments of the present invention, there is provided a page data obtaining method, including:
receiving a data acquisition request sent by a front end of a page, wherein the data acquisition request indicates domain name information;
acquiring page data from a cache corresponding to a content distribution network according to the domain name information;
under the condition that the page data is not obtained from the cache, obtaining the page data from the source server;
under the condition that the page data is not obtained from a source server, obtaining the page data from a backup server corresponding to the source server;
and sending the page data to the front end of the page for page display.
Optionally, the obtaining page data from a cache corresponding to a content delivery network according to the domain name information includes:
acquiring the page data from a local cache corresponding to a content distribution network according to the domain name information;
and under the condition that the page data is failed to be acquired from the local cache, acquiring the page data from a Redis cache corresponding to the content distribution network.
Optionally, the method further comprises:
and the page front end verifies the page data under the condition that the page data is received, so that a standby data interface corresponding to the domain name information is directly called to acquire the page data under the condition that the data verification is not passed.
Optionally, the method further comprises:
under the condition that the page display is abnormal, when a data acquisition request sent by the front end of the page is received, the page data is directly acquired from backup data stored in a source server.
Optionally, one or more pieces of page data generated by the source server in different historical time periods are stored in the backup data of the backup server or the source server.
Optionally, the verifying, by the page front end, the page data when the page data is received includes: and judging whether the page data can be used for displaying a complete page.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a page data acquiring apparatus including: the system comprises a data acquisition request receiving module, a page data acquisition module and a page data sending module; wherein,
the data acquisition request receiving module is used for receiving a data acquisition request sent by a page front end, wherein the data acquisition request indicates domain name information;
the page data acquisition module is used for acquiring page data from a cache corresponding to a content distribution network according to the domain name information; under the condition that the page is not obtained from the cache, obtaining the page data from the source server; under the condition that the page data is not obtained from a source server, obtaining the page data from a backup server corresponding to the source server;
and the page data sending module is used for sending the page data to the front end of the page for display.
Optionally, the obtaining page data from a cache corresponding to a content delivery network according to the domain name information includes:
acquiring page data from a local cache corresponding to a content distribution network according to the domain name information;
and under the condition that the page data is failed to be acquired from the local cache, acquiring the page data from a Redis cache corresponding to the content distribution network.
Optionally, the page front end checks the page data when receiving the page data, so as to directly call a standby data interface corresponding to the domain name information to obtain the page information when the data check fails.
Optionally, the page data obtaining module is further configured to,
under the condition that the page display is abnormal, when a data acquisition request sent by the front end of the page is received, the page data is directly acquired from backup data stored in a source server.
Optionally, one or more pieces of page data generated by the source server in different historical time periods are stored in the backup data of the backup server or the source server.
Optionally, the verifying, by the page front end, the page data when the page data is received includes: and judging whether the page data can be used for displaying a complete page.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a server for acquiring page data, including: one or more processors; a storage device, configured to store one or more programs that, when executed by the one or more processors, cause the one or more processors to implement any of the page retrieval methods described above.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a computer readable medium having stored thereon a computer program which, when executed by a processor, implements any one of the page retrieval methods described above.
One embodiment of the above invention has the following advantages or benefits: when a data acquisition request sent by a page front end is received, acquiring page data from a cache corresponding to a content distribution network according to the domain name information; then, under the condition that the page data is unsuccessfully obtained from the cache, obtaining the page data from the source server; and finally, under the condition that the page data is not obtained from the source server, obtaining the page data from a backup server corresponding to the source server, and sending the page data to the front end of the page for page display. Therefore, even if the source server is abnormal or the network between the content sub-network and the source server is abnormal, the correct and available page data can be obtained for page display in one mode of cache, the source server or the backup server, and the like, so that the high availability of the page is ensured, and the experience of the page access user is improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a page data acquisition method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a main flow of another page data acquisition method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of the main blocks of a page data acquisition apparatus according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 5 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
As shown in fig. 1, an embodiment of the present invention provides a page data obtaining method, which may specifically include the following steps:
step S101, receiving a data acquisition request sent by a front end of a page, wherein the data acquisition request indicates domain name information.
If the user requests to access the kyoton as an example, the data acquisition request sent by the front end of the page indicates the domain name informationwww.jd.comAnd a Content Delivery Network (CDN) backtracks to the source server according to the domain name information and the preconfigured routing rule to capture and cache page data, so that a user directly obtains corresponding page data from the cache when requesting to access the page again, and thus, the page rendering and displaying speed can be increased, and the user experience is improved. Various data sources for page display are packaged and aggregated in the source server.
And step S102, acquiring page data from a cache corresponding to the content distribution network according to the domain name information.
The cache corresponding to the content distribution network can be a local cache or a non-local cache, so that the time of backtracking to the source server for capturing the page data is saved, the efficiency of acquiring the page data is improved, and the user experience is further improved.
In an optional implementation manner, the obtaining page data from a cache corresponding to a content delivery network according to the domain name information includes: acquiring the page data from a local cache corresponding to a content distribution network according to the domain name information; and under the condition that the page data is failed to be acquired from the local cache, acquiring the page data from a Redis cache corresponding to the content distribution network.
That is, the content delivery network can write the page data into the local cache and the Redis cache simultaneously after capturing the page data from the origin server based on the domain name information. Due to the fact that the cache time limit and the cache space corresponding to the local cache and the Redis cache are different, the stored page data in the local cache and the Redis cache have failure conditions of different degrees. Therefore, under the condition that a user requests to acquire data, the content distribution network can search the page data from the local cache first, and then search the corresponding page data from the Redis cache under the condition that the search fails in the local cache, so that the time for directly acquiring the page data from the source server by the front end of the page is saved. It should be noted that, in the embodiment of the present application, only the local cache and the Redis cache are taken as examples for description, and other caching technologies may also be used.
Step S103, under the condition that the page data is not obtained from the cache, obtaining the page data from the source server.
It can be understood that, whether the cache is a local cache or a Redis cache, there is always a case of a failure in the page data therein, and therefore, when a data acquisition request sent by a page front end is received, there is a case of a failure in acquiring the page data from the cache. Therefore, in order to ensure normal display of the page, a dynamic service interface provided by the source server needs to be called according to the domain name information, and page data is directly acquired from the source server.
In addition, in order to avoid page loading abnormity caused by server abnormity or abnormity of a network between a content distribution network and a source server, scripts can be configured on the source server, and page data such as html files and the like are generated after source server assembly splicing data is regularly or periodically pushed to a backup server corresponding to the source server by a worker. Meanwhile, in order to realize disaster recovery degradation of the source server and improve high availability of the page, page data such as html files and the like are generated after the source server is pushed to backup data of the source server by a worker regularly or regularly to assemble spliced data. Therefore, the backup server and the backup data corresponding to the source server both store one or more page data generated by the source server in different historical time periods. Furthermore, the page data generated in the past time period can be checked by taking time as a dimension, and the problem of the newly generated page data in the source server is that the page data in a certain historical time period stored in the backup data is directly used, so that the degradation disaster tolerance is realized.
More specifically, the same backup server may be set for all source servers through the path specified by the location, or multiple backup servers may be set according to the actual situation, for example, the same backup server is set for the source servers where different applications are located. Meanwhile, dual-computer hot standby is realized through nginx on the content distribution network server, namely, by setting a backup parameter, when the source server is abnormal, namely, when the page data cannot be acquired from the source server by calling the dynamic service interface, the method automatically skips to the backup server corresponding to the source server to acquire the page data.
And step S104, under the condition that the page data is not acquired from the source server, acquiring the page data from a backup server corresponding to the source server.
It can be understood that, in the case that an abnormality occurs in the source server or a network between the content distribution network and the server is jittered, the page data or the correct page data cannot be acquired from the source server by calling the dynamic service interface, so that there is a case that the acquisition of the page data from the source server fails. In this case, in order to ensure normal display of the page, the page data is directly acquired from the backup server corresponding to the source server according to the data acquisition request, so that even if the source server is abnormal or the network between the content distribution network and the server is jittered, the page data can be acquired for page display.
And step S105, sending the page data to the front end of the page for page display.
In an optional embodiment, the method further comprises: and the page front end verifies the page data under the condition that the page data is received, so that a standby data interface corresponding to the domain name information is directly called to acquire the page data under the condition that the data verification is not passed. That is, the front end of the page may be configured with a certain data check logic to check the received page data, for example, to determine whether the page data can be used to display a complete page, whether the data return interface is normal, and the like, so as to ensure the availability of the content delivery network interface. Therefore, under the condition that the content distribution network interface is judged to be unavailable, the page front end does not use the currently received page data to display the page, and directly calls the corresponding standby data interface to acquire the page data according to the domain name information, so that the disaster tolerance degradation of the content distribution network interface is realized, the reliability of the page data is ensured, the error of the displayed page data is avoided, the high availability of the page is improved, and the user experience is further improved.
In addition, it is worth noting that on the basis of page data such as html files and the like generated after splicing data are assembled to backup data of a source server at regular time or regular time by a worker, when abnormal page display occurs, such as page messy codes or json file messy codes, when a data acquisition request sent by a page front end is received, the page data is directly acquired from the backup data stored in the source server. That is, when the extreme problems such as messy codes and the like which cannot be overcome by dynamically acquiring the page data occur in the page, the source server can be directly subjected to manual disaster tolerance degradation, the page data stored in the backup data is directly used for page display, and the page data is not acquired from the source server from the cache or the dynamic service interface is called any more, so that the normal operation of the page display is ensured, namely the high availability of the page is ensured.
Based on the page data acquisition method provided by the embodiment, multi-level disaster tolerance degradation of the source server and the content distribution network is realized by setting various modes such as the cache, the backup server, the backup data and the backup data interface, so that even if the source server is abnormal or the network between the content distribution network and the source server is abnormal, correct and available page data can be acquired to display a page through one mode of the cache, the source server, the backup server and the backup data interface, the high availability of the page is ensured, and the experience of a page access user is further improved.
As shown in fig. 2, on the basis of the foregoing embodiment, an embodiment of the present invention provides another page data obtaining method, which may specifically include the following steps:
step S201, receiving a data acquisition request sent by a front end of a page, where the data acquisition request indicates domain name information.
Step S202, according to the domain name information, the page data is obtained from a local cache corresponding to a content distribution network.
Step S203, in case of failure to obtain the page data from the local cache, obtaining the page data from the Redis cache corresponding to the content distribution network.
Step S204, under the condition that the page data is failed to be obtained from the Redis cache, a dynamic service interface is called, and the page data is obtained from a source server.
Step S205, when the acquisition of the page data from the source server fails, acquiring the page data from the backup server corresponding to the source server.
Step S206, sending the page data to the page front end, so that the page front end verifies the page data, and calling a data interface corresponding to the domain name information to obtain the page data when the page data is not verified.
As shown in fig. 3, on the basis of the above embodiment, an embodiment of the present invention provides a page data acquiring apparatus 300, including: a data acquisition request receiving module 301, a page data acquisition module 302, and a page data transmitting module 303; wherein,
the data obtaining request receiving module 301 is configured to receive a data obtaining request sent by a front end of a page, where the data obtaining request indicates domain name information;
the page data obtaining module 302 is configured to obtain page data from a cache corresponding to a content distribution network according to the domain name information; under the condition that the page is not obtained from the cache, obtaining the page data from the source server; under the condition that the page data is not obtained from a source server, obtaining the page data from a backup server corresponding to the source server;
the page data sending module 303 is configured to send the page data to the front end of the page for displaying.
In an optional implementation manner, the obtaining page data from a cache corresponding to a content delivery network according to the domain name information includes:
acquiring page data from a local cache corresponding to a content distribution network according to the domain name information;
and under the condition that the page data is failed to be acquired from the local cache, acquiring the page data from a Redis cache corresponding to the content distribution network.
In an optional implementation manner, the page front end checks the page data when receiving the page data, so as to directly call a standby data interface corresponding to the domain name information to obtain the page information when the data check fails.
In an alternative embodiment, the page data obtaining module 302 is further configured to,
under the condition that the page display is abnormal, when a data acquisition request sent by the front end of the page is received, the page data is directly acquired from backup data stored in a source server.
In an optional implementation manner, the backup data of the backup server or the source server stores one or more pieces of page data generated by the source server in different historical time periods.
In an optional implementation manner, in a case that the page front end receives the page data, verifying the page data includes: and judging whether the page data can be used for displaying a complete page.
An embodiment of the present invention further provides a server for acquiring page data, including: one or more processors; a storage device, configured to store one or more programs that, when executed by the one or more processors, cause the one or more processors to implement any one of the page data obtaining methods described above.
An embodiment of the present invention is a computer readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements any one of the above-described page data obtaining methods.
Fig. 4 shows an exemplary system architecture 400 to which the page data acquisition method or the page data acquisition apparatus of the embodiments of the present invention can be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 serves as a medium for providing communication links between the terminal devices 401, 402, 403 and the server 405. Network 404 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 401, 402, 403 to interact with a server 405 over a network 404 to receive or send messages or the like. Various applications for page access, such as a shopping application, a web browser application, and the like, may be installed on the terminal devices 401, 402, and 403.
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 405 may be a server that provides various services, such as a background management server that supports shopping websites browsed by users using the terminal devices 401, 402, and 403. The background management server can obtain page data according to the received page loading request, and feed back the obtained page data to the terminal equipment for page display.
It should be noted that the page data obtaining method provided by the embodiment of the present invention is generally executed by the server 405, and accordingly, the page data obtaining device is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks, and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor comprises a data acquisition request receiving module, a page data acquisition module and a page data sending module. The names of these modules do not constitute a limitation to the module itself in some cases, for example, the page data transmission module may also be described as a "module for transmitting the page data to the front end of the page for presentation".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: receiving a data acquisition request sent by a front end of a page, wherein the data acquisition request indicates domain name information; acquiring page data from a cache corresponding to a content distribution network according to the domain name information; under the condition that the page data is not obtained from the cache, obtaining the page data from the source server; under the condition that the page data is not obtained from a source server, obtaining the page data from a backup server corresponding to the source server; and sending the page data to the front end of the page for page display.
According to the technical scheme of the embodiment of the invention, multi-level disaster tolerance degradation of the source server and the content distribution network is realized by setting a plurality of modes such as the cache, the backup server, the backup data and the backup data interface, so that even if the source server is abnormal or the network between the content distribution network and the source server is abnormal, correct and available page data can be obtained for page display by one mode of the cache, the source server, the backup server and the backup data interface or the like, the high availability of the page is ensured, and the experience of a page access user is further improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. A page data acquisition method is characterized by comprising the following steps:
receiving a data acquisition request sent by a front end of a page, wherein the data acquisition request indicates domain name information;
acquiring page data from a cache corresponding to a content distribution network according to the domain name information;
under the condition that the page data is not obtained from the cache, obtaining the page data from the source server;
under the condition that the page data is not obtained from a source server, obtaining the page data from a backup server corresponding to the source server;
and sending the page data to the front end of the page for page display.
2. The method according to claim 1, wherein the obtaining page data from a cache corresponding to a content delivery network according to the domain name information includes:
acquiring the page data from a local cache corresponding to a content distribution network according to the domain name information;
and under the condition that the page data is failed to be acquired from the local cache, acquiring the page data from a Redis cache corresponding to the content distribution network.
3. The page data acquisition method according to claim 1, further comprising:
and the page front end verifies the page data under the condition that the page data is received, so that a standby data interface corresponding to the domain name information is directly called to acquire the page data under the condition that the data verification is not passed.
4. The page data acquisition method according to claim 1, further comprising:
under the condition that the page display is abnormal, when a data acquisition request sent by the front end of the page is received, the page data is directly acquired from backup data stored in a source server.
5. The page data obtaining method according to claim 4,
one or more page data generated by the source server in different historical time periods are stored in the backup data of the backup server or the source server.
6. The method for acquiring page data according to claim 3, wherein the verifying the page data by the page front end when receiving the page data includes:
and judging whether the page data can be used for displaying a complete page.
7. A page data acquisition apparatus, comprising: the system comprises a data acquisition request receiving module, a page data acquisition module and a page data sending module; wherein,
the data acquisition request receiving module is used for receiving a data acquisition request sent by a page front end, wherein the data acquisition request indicates domain name information;
the page data acquisition module is used for acquiring page data from a cache corresponding to a content distribution network according to the domain name information; under the condition that the page is not obtained from the cache, obtaining the page data from the source server; under the condition that the page data is not obtained from a source server, obtaining the page data from a backup server corresponding to the source server;
and the page data sending module is used for sending the page data to the front end of the page for display.
8. The apparatus according to claim 7, wherein the acquiring, according to the domain name information, page data from a cache corresponding to a content delivery network includes:
acquiring page data from a local cache corresponding to a content distribution network according to the domain name information;
and under the condition that the page data is failed to be acquired from the local cache, acquiring the page data from a Redis cache corresponding to the content distribution network.
9. The page data obtaining apparatus according to claim 7,
and the page front end verifies the page data under the condition that the page data is received, so that a standby data interface corresponding to the domain name information is directly called to acquire the page information under the condition that the data verification is not passed.
10. The page data obtaining apparatus according to claim 7, wherein said page data obtaining module is further configured to,
under the condition that the page display is abnormal, when a data acquisition request sent by the front end of the page is received, the page data is directly acquired from backup data stored in a source server.
11. The page data acquisition apparatus according to claim 10,
one or more page data generated by the source server in different historical time periods are stored in the backup data of the backup server or the source server.
12. The apparatus according to claim 9, wherein the verifying the page data by the page front end when receiving the page data includes:
and judging whether the page data can be used for displaying a complete page.
13. A server for retrieving page data, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
14. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN202011125476.XA 2020-10-20 2020-10-20 Page data acquisition method and device Pending CN113761414A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011125476.XA CN113761414A (en) 2020-10-20 2020-10-20 Page data acquisition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011125476.XA CN113761414A (en) 2020-10-20 2020-10-20 Page data acquisition method and device

Publications (1)

Publication Number Publication Date
CN113761414A true CN113761414A (en) 2021-12-07

Family

ID=78785883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011125476.XA Pending CN113761414A (en) 2020-10-20 2020-10-20 Page data acquisition method and device

Country Status (1)

Country Link
CN (1) CN113761414A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188574A (en) * 2011-12-28 2013-07-03 华为技术有限公司 Method and system for transmitting network video
CN107766509A (en) * 2017-10-23 2018-03-06 北京京东尚科信息技术有限公司 A kind of method and apparatus of webpage static backup

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188574A (en) * 2011-12-28 2013-07-03 华为技术有限公司 Method and system for transmitting network video
CN107766509A (en) * 2017-10-23 2018-03-06 北京京东尚科信息技术有限公司 A kind of method and apparatus of webpage static backup

Similar Documents

Publication Publication Date Title
CN111427701A (en) Workflow engine system and business processing method
CN111800223B (en) Method, device and system for generating sending message and processing receiving message
CN111782502A (en) Automatic testing method and device
CN113779004A (en) Data verification method and device
CN113760522A (en) Task processing method and device
CN110275701B (en) Data processing method, device, medium and computing equipment
CN112559024A (en) Method and device for generating transaction code change list
CN116737662A (en) Method, device, electronic equipment and storage medium for processing business data
CN113360815A (en) Request retry method and device
CN113157405A (en) Method and device for retrying breakpoint of business process
CN112149392A (en) Rich text editing method and device
CN111953718A (en) Page debugging method and device
CN114257632B (en) Method and device for reconnecting broken wire, electronic equipment and readable storage medium
CN113761414A (en) Page data acquisition method and device
CN112272211A (en) Service request processing method, device and system
CN113760693A (en) Method and apparatus for local debugging of microservice systems
CN110868477A (en) Task scheduling method, device and system
CN113132447A (en) Reverse proxy method and system
CN111209014A (en) Parameter checking method and device
CN114356788B (en) Application program detection method, device, equipment and medium based on user information
CN114584547B (en) API (application program interface) calling method and device
CN113766437B (en) Short message sending method and device
CN110011767B (en) Method and apparatus for TCP connection backup
CN113778660A (en) System and method for managing hot spot data
CN115168212A (en) Method, device, equipment and computer readable medium for testing software

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