CN111259300A - Page loading method, device and system - Google Patents
Page loading method, device and system Download PDFInfo
- Publication number
- CN111259300A CN111259300A CN202010054895.2A CN202010054895A CN111259300A CN 111259300 A CN111259300 A CN 111259300A CN 202010054895 A CN202010054895 A CN 202010054895A CN 111259300 A CN111259300 A CN 111259300A
- Authority
- CN
- China
- Prior art keywords
- page
- client
- database
- cache
- sending
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
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 Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application discloses a page loading method, a page loading device and a page loading system. The method comprises the following steps: receiving a page modification request aiming at the page error information of the first client and sent by the second client; updating a cache and a database according to the page modification request and storing a modification record in the database; judging whether a page loading request sent by a first client is interrupted or not; if the interruption is not caused, inquiring page content corresponding to the page loading request in the updated cache or database; and sending the inquired page content to the first client so that the first client carries out page loading according to the page content. According to the method and the device, when the page is loaded, the page content is read from the cache or the database and does not need to be packaged in the code, and when the page is loaded and has a problem, the page content can be modified and updated to the cache and the database in real time, so that the page does not need to be re-released, risks caused by the release are avoided, and the page is strong in restorability and easy to repair.
Description
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a page loading method, device and system.
Background
In the internet technology, especially in the website development technology, the background technology presents the current situation of coexistence of various technologies, and different technologies can realize page rendering, but in all the technologies, the pages are almost written with codes in advance and then are issued to a server so as to achieve the purpose of user access.
In the current technical implementation means, although the function of page rendering can be realized, the page needs to be re-versioned every time when a problem occurs in the page, so that the risks caused by versioning are increased, the page restoration performance is weak, and the page problem cannot be timely repaired.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a page loading method, device and system. When the page is loaded, the page content is read from a cache or a database and does not need to be packaged in a code, and when the page is loaded and has a problem, the edition does not need to be re-issued, so that the risk caused by the edition issuing is avoided, and the page has strong recoverability and is easy to repair.
The embodiment of the invention provides the following specific technical scheme:
in a first aspect, the present invention provides a page loading method, including:
receiving a page modification request aiming at the page error information of the first client and sent by the second client; the page fault information is generated when the first client fails to load after sending a page loading request;
updating a cache and a database according to the page modification request and storing a modification record in the database;
judging whether a page loading request sent by the first client is interrupted or not;
if the interruption is not caused, inquiring page content corresponding to the page loading request in an updated cache or database;
and sending the inquired page content to the first client so that the first client carries out page loading according to the page content.
Preferably, the method further comprises:
receiving page error information sent by the first client;
and storing the page fault information in a database, and simultaneously sending the page fault information to the second client.
Preferably, the method further comprises:
acquiring state data of a target object according to the started timing task; the target object comprises at least one of a cache, a database, a page and a network;
judging whether the state data of the target object is abnormal or not;
and when the abnormality exists, generating a corresponding abnormality report and sending the abnormality report to the second client.
Preferably, the page content includes at least one of HTML, JavaScript, css, jsp page, asp page, php page, ajax, jQuery, xml, json, xhtml, el expression, java code, php code, and c # code.
In a second aspect, the present invention provides a page loading apparatus, including:
the receiving module is used for receiving a page modification request aiming at the page error information of the first client side, which is sent by the second client side; the page fault information is generated when the first client fails to load after sending a page loading request;
the updating module is used for updating the cache and the database according to the page modification request and storing the modification record in the database;
the judging module is used for judging whether the page loading request sent by the first client is interrupted or not;
the query module is used for querying the page content corresponding to the page loading request in the updated cache or database when the interruption is not performed;
and the sending module is used for sending the inquired page content to the first client so as to enable the first client to carry out page loading according to the page content.
Preferably, the receiving module is further configured to receive page fault information sent by the first client;
the updating module is further used for storing the page fault information in a database;
the sending module is further configured to send the page fault information to the second client.
Preferably, the apparatus further comprises:
the acquisition module is used for acquiring the state data of the target object according to the started timing task; the target object comprises at least one of a cache, a database, a page and a network;
the judging module is also used for judging whether the state data of the target object is abnormal or not;
and the generating module is used for generating a corresponding abnormal report and sending the abnormal report to the second client when the abnormality exists.
Preferably, the page content includes at least one of HTML, JavaScript, css, jsp page, asp page, php page, ajax, jQuery, xml, json, xhtml, el expression, java code, php code, and c # code.
In a third aspect, the present invention provides a computer system comprising:
one or more processors; and
a memory associated with the one or more processors for storing program instructions that, when read and executed by the one or more processors, perform operations comprising:
receiving a page modification request aiming at the page error information of the first client and sent by the second client; the page fault information is generated when the first client fails to load after sending a page loading request;
updating a cache and a database according to the page modification request and storing a modification record in the database;
judging whether a page loading request sent by the first client is interrupted or not;
if the interruption is not caused, inquiring page content corresponding to the page loading request in an updated cache or database;
and sending the inquired page content to the first client so that the first client carries out page loading according to the page content.
The embodiment of the invention has the following beneficial effects:
1. according to the invention, when the page is loaded, the page content is read from the cache or the database without being packaged in the code, and when the page is loaded and has a problem, the page content can be modified and updated into the cache or the database in real time, so that the page can be dynamically updated in real time without re-edition, the risk caused by edition sending is avoided, the page has strong restorability, is easy to repair, and the use feeling of a user is improved;
2. when the page has bug or other conditions, the invention can receive and store error information sent by the user end in real time so as to facilitate the developer to process in time;
3. the invention can regularly acquire the state data of the target object and judge the state data, and can generate the abnormal report when the faults occur in the cache, the database, the network, the page and the like, so that a developer can process the abnormal report in time, thereby improving the high availability and the stability of the system.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is an application environment diagram of a page loading method according to an embodiment of the present application;
fig. 2 is a flowchart of a page loading method provided in the second embodiment of the present application;
fig. 3 is a schematic structural diagram of a page loading apparatus according to a third embodiment of the present application;
fig. 4 is a diagram of a computer system architecture according to a fourth embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
A page loading method can be applied to the environment shown in FIG. 1. When a user sends an access request to a route through a browser, the route requests corresponding page content to a cache of a server according to the access request, when the page content does not exist in the cache, the server inquires from a database and sends the inquired page content to the route, and the route sends the page content to the browser for loading to generate a display page.
When a page loading error (such as page display 404 or page rendering is not in place) occurs, the browser sends page error information to the server, and the server stores the page error information in the database for backup and sends the page error information to the developer user so that the developer user can process the page error information. Research and development personnel can send a page modification request through the page management platform, the server side correspondingly updates the cache and the database according to the page modification request, and saves a modification record in the database, so that page codes can be conveniently rolled back, and at the moment, if the browser sends a page loading request corresponding to the updated page content, the server side can send the updated page content to the browser according to the updated cache or the database, so that the browser can carry out page loading according to the updated page content.
In addition, in order to improve the high availability and stability of the system, the server side acquires the state data sent by the cache, the database, the network, the page and the like according to the timing task, and generates an abnormal report when the state data is abnormal and sends the abnormal report to the user side of the research and development personnel so that the research and development personnel can process the abnormal report in time.
The state data of the database comprises integrity check data, data consistency check data and response time; the cached state data comprises integrity check data, data consistency check data and response time; the state data of the page comprises page loading data, page response time and the like; the state data of the network comprises communication condition data of the network; in addition, other data may be included.
Through the implementation process, when the page is loaded, the page content is read from the cache or the database and does not need to be packaged in the code, and when the page is loaded and has a problem, the edition does not need to be re-issued, so that the risk caused by the edition issuing is avoided, and the page is strong in restorability and easy to repair.
Example two
Corresponding to the embodiment, the present application provides a page loading method, as shown in fig. 2, including:
s21, receiving a page modification request aiming at the page error information of the first client and sent by the second client; the page fault information is generated when the loading fails after the first client sends the page loading request.
And S22, updating the cache and the database according to the page modification request and storing the modification record in the database.
S23, judging whether the page loading request sent by the first client is interrupted or not;
and S24, if the interruption is not caused, searching the updated cache or database for the page content corresponding to the page loading request.
The method specifically comprises the following steps:
and inquiring page content corresponding to the page loading request in the updated cache, and if the corresponding page content cannot be inquired in the cache, inquiring the page content corresponding to the page loading request in the updated database.
The page content comprises at least one of HTML, JavaScript, css, jsp page, asp page, php page, ajax, jQuery, xml, json, xhtml, el expression, java code, php code and c # code.
The cache may be a Google cache, memcache, or other distributed server cache.
And S25, sending the inquired page content to the first client so that the first client can load the page according to the page content.
In addition, when a page loading error occurs (for example, the page is displayed 404, or the page is not rendered in place), the method and the device can also realize real-time notification of the page error information so that research and development personnel can modify the page error information in time, and specifically can include the following steps:
1. receiving page error information sent by a first client;
2. and storing the page fault information in a database, and simultaneously sending the page fault information to the second client.
The method can also realize real-time monitoring on the network, the cache, the database, the page and the like, and specifically comprises the following steps:
1. acquiring state data of a target object according to the started timing task; the target object comprises at least one of a cache, a database, a page and a network;
2. judging whether the state data of the target object is abnormal or not;
3. and when the abnormity exists, generating a corresponding abnormity report and sending the report to the second client.
EXAMPLE III
As shown in fig. 3, corresponding to the second embodiment, the present application provides a page loading apparatus, including:
a receiving module 31, configured to receive a page modification request for page fault information of a first client sent by a second client; the page fault information is generated when the loading fails after the first client sends a page loading request;
an update module 32, configured to update the cache and the database according to the page modification request and store the modification record in the database;
the determining module 33 is configured to determine whether a page loading request sent by the first client is interrupted;
the query module 34 is configured to query, when the cache or the database is not interrupted, the page content corresponding to the page loading request in the updated cache or the updated database;
the page content comprises at least one of HTML, JavaScript, css, jsp page, asp page, php page, ajax, jQuery, xml, json, xhtml, el expression, java code, php code and c # code.
The sending module 35 is configured to send the queried page content to the first client, so that the first client performs page loading according to the page content.
Preferably, the receiving module 31 is further configured to receive page fault information sent by the first client;
the updating module 32 is further configured to store the page fault information in a database;
the sending module 35 is further configured to send the page fault information to the second client.
Preferably, the above apparatus further comprises:
an obtaining module 36, configured to obtain state data of the target object according to the started timing task; the target object comprises at least one of a cache, a database, a page and a network;
the judging module 33 is further configured to judge whether the state data of the target object is abnormal;
and the generating module 37 is configured to generate a corresponding exception report and send the exception report to the second client when there is an exception.
Example four
In accordance with an embodiment, the present application provides a computer system, comprising:
one or more processors; and
a memory associated with the one or more processors for storing program instructions that, when read and executed by the one or more processors, perform operations comprising:
receiving a page modification request aiming at the page error information of the first client and sent by the second client; the page fault information is generated when the first client fails to load after sending a page loading request;
updating a cache and a database according to the page modification request and storing a modification record in the database;
judging whether a page loading request sent by the first client is interrupted or not;
if the interruption is not caused, inquiring page content corresponding to the page loading request in an updated cache or database;
and sending the inquired page content to the first client so that the first client carries out page loading according to the page content.
FIG. 4 illustrates an architecture of a computer system that may include, in particular, a processor 42, a video display adapter 44, a disk drive 46, an input/output interface 48, a network interface 410, and a memory 412. The processor 42, video display adapter 44, disk drive 46, input/output interface 48, network interface 410, and memory 412 may be communicatively coupled via a communication bus 414.
The processor 42 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solution provided in the present Application.
The Memory 412 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random access Memory), a static storage device, a dynamic storage device, or the like. The memory 412 may store an operating system 416 for controlling the operation of the computer system 40, a Basic Input Output System (BIOS)418 for controlling low-level operations of the computer system. In addition, a web browser 420, a data storage management system 422, and the like may also be stored. In summary, when the technical solution provided by the present application is implemented by software or firmware, the relevant program codes are stored in the memory 412 and called for execution by the processor 42.
The input/output interface 48 is used for connecting an input/output module to realize information input and output. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The network interface 410 is used for connecting a communication module (not shown in the figure) to realize the communication interaction between the device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
The communication bus 414 comprises a path that transfers information between the various components of the device, such as the processor 42, the video display adapter 44, the disk drive 46, the input/output interface 48, the network interface 410, and the memory 412.
In addition, the computer system can also obtain the information of specific receiving conditions from the virtual resource object receiving condition information database for condition judgment and the like.
It should be noted that although the above-described device only shows the processor 42, the video display adapter 44, the disk drive 46, the input/output interface 48, the network interface 410, the memory 412, the communication bus 414, etc., in a specific implementation, the device may also include other components necessary to achieve proper operation.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
Claims (9)
1. A page loading method, characterized in that the method comprises:
receiving a page modification request aiming at the page error information of the first client and sent by the second client; the page fault information is generated when the first client fails to load after sending a page loading request;
updating a cache and a database according to the page modification request and storing a modification record in the database;
judging whether a page loading request sent by the first client is interrupted or not;
if the interruption is not caused, inquiring page content corresponding to the page loading request in an updated cache or database;
and sending the inquired page content to the first client so that the first client carries out page loading according to the page content.
2. The method of claim 1, further comprising:
receiving page error information sent by the first client;
and storing the page fault information in a database, and simultaneously sending the page fault information to the second client.
3. The method of claim 1, further comprising:
acquiring state data of a target object according to the started timing task; the target object comprises at least one of a cache, a database, a page and a network;
judging whether the state data of the target object is abnormal or not;
and when the abnormality exists, generating a corresponding abnormality report and sending the abnormality report to the second client.
4. The method according to any one of claims 1 to 3, wherein the page content comprises at least one of HTML, JavaScript, css, jsp page, asp page, php page, ajax, jQuery, xml, json, xhtml, el expression, java code, php code, and c # code.
5. An apparatus for page loading, the apparatus comprising:
the receiving module is used for receiving a page modification request aiming at the page error information of the first client side, which is sent by the second client side; the page fault information is generated when the first client fails to load after sending a page loading request;
the updating module is used for updating the cache and the database according to the page modification request and storing the modification record in the database;
the judging module is used for judging whether the page loading request sent by the first client is interrupted or not;
the query module is used for querying the page content corresponding to the page loading request in the updated cache or database when the interruption is not performed;
and the sending module is used for sending the inquired page content to the first client so as to enable the first client to carry out page loading according to the page content.
6. The apparatus according to claim 5, wherein the receiving module is further configured to receive page fault information sent by the first client;
the updating module is further used for storing the page fault information in a database;
the sending module is further configured to send the page fault information to the second client.
7. The apparatus of claim 5, further comprising:
the acquisition module is used for acquiring the state data of the target object according to the started timing task; the target object comprises at least one of a cache, a database, a page and a network;
the judging module is also used for judging whether the state data of the target object is abnormal or not;
and the generating module is used for generating a corresponding abnormal report and sending the abnormal report to the second client when the abnormality exists.
8. The device according to any one of claims 5 to 7, wherein the page content comprises at least one of HTML, JavaScript, css, jsp page, asp page, php page, ajax, jQuery, xml, json, xhtml, el expression, java code, php code, and c # code.
9. A computer system, comprising:
one or more processors; and
a memory associated with the one or more processors for storing program instructions that, when read and executed by the one or more processors, perform operations comprising:
receiving a page modification request aiming at the page error information of the first client and sent by the second client; the page fault information is generated when the first client fails to load after sending a page loading request;
updating a cache and a database according to the page modification request and storing a modification record in the database;
inquiring page content corresponding to the page loading request in the updated cache or database;
and sending the inquired page content to the first client so that the first client carries out page loading according to the page content.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010054895.2A CN111259300B (en) | 2020-01-17 | 2020-01-17 | Page loading method, device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010054895.2A CN111259300B (en) | 2020-01-17 | 2020-01-17 | Page loading method, device and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111259300A true CN111259300A (en) | 2020-06-09 |
CN111259300B CN111259300B (en) | 2023-05-19 |
Family
ID=70947127
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010054895.2A Active CN111259300B (en) | 2020-01-17 | 2020-01-17 | Page loading method, device and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111259300B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016002118A1 (en) * | 2014-07-04 | 2016-01-07 | キヤノン株式会社 | Information processing device and information processing method |
CN106446174A (en) * | 2016-09-28 | 2017-02-22 | 江西博瑞彤芸科技有限公司 | Method for page loading in application |
CN110489696A (en) * | 2019-07-31 | 2019-11-22 | 上海艾融软件股份有限公司 | Buffering updating method, device and electronic equipment, storage medium |
-
2020
- 2020-01-17 CN CN202010054895.2A patent/CN111259300B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016002118A1 (en) * | 2014-07-04 | 2016-01-07 | キヤノン株式会社 | Information processing device and information processing method |
CN106446174A (en) * | 2016-09-28 | 2017-02-22 | 江西博瑞彤芸科技有限公司 | Method for page loading in application |
CN110489696A (en) * | 2019-07-31 | 2019-11-22 | 上海艾融软件股份有限公司 | Buffering updating method, device and electronic equipment, storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111259300B (en) | 2023-05-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11392461B2 (en) | Method and apparatus for processing information | |
JP5723208B2 (en) | Fail-safe mechanism for dynamic software measurement using callbacks | |
CN105049486B (en) | Method for edition management, the apparatus and system of static file | |
JP5511845B2 (en) | A method for performing server-side logging of client browser status through markup languages | |
US8312450B2 (en) | Widgetizing a web-based application | |
CN103873502A (en) | Cache updating method and system, and update resource providing method and system | |
US20130212595A1 (en) | Dynamic injection of code into running process | |
CN107357890B (en) | Webpage file processing method, device and system and storage equipment | |
CN105989098B (en) | Icon package generation method and server, and icon processing method and system | |
CN111079048B (en) | Page loading method and device | |
CN113343154A (en) | Page loading method and device, electronic equipment and storage medium | |
US20130124971A1 (en) | Real time web script refresh using asynchronous polling without full web page reload | |
CN110716825A (en) | Data disaster tolerance processing method, device and system | |
CN117891645A (en) | Display fault detection method and device, electronic equipment and storage medium | |
CN116088892A (en) | Distributed service system configuration changing method, device, computer equipment and medium | |
CN110618814A (en) | Data visualization method and device, electronic equipment and computer readable storage medium | |
CN111259300A (en) | Page loading method, device and system | |
CN110119388B (en) | File reading and writing method, device, system, equipment and computer readable storage medium | |
JP2013168156A (en) | Determination of standby time of content server | |
CN114138397B (en) | Page display method and device, electronic equipment and storage medium | |
CN113918237B (en) | Gray release method, device, equipment and computer readable medium | |
CN111338928A (en) | Chrome-based browser testing method and device | |
CN115048107A (en) | Code compiling method, system, electronic device and storage medium | |
US7779044B2 (en) | Load simulator, computer readable medium, computer, and load simulating method | |
CN114995847A (en) | Hot update method, device, equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |