Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Page rendering processing method, device and equipment and readable storage medium

A processing method and page technology, applied in the field of web page rendering

Pending Publication Date: 2020-05-19
BEIJING DIDI INFINITY TECH & DEV
View PDF3 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Embodiments of the present invention provide a page rendering processing method, device, device, and readable storage medium to solve the problem that the NodeJS service in the prior art will clear the cached data only when it is restarted.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Page rendering processing method, device and equipment and readable storage medium
  • Page rendering processing method, device and equipment and readable storage medium
  • Page rendering processing method, device and equipment and readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0035] figure 1 It is a flow chart of the page rendering method provided by Embodiment 1 of the present invention. The embodiment of the present invention aims at clearing the cached data only when the NodeJS service in the prior art is restarted. If the module in the js file is changed, the NodeJS service will not update the cached data of the changed module, and the NodeJS service will still use the cached data of the module before the change before restarting, resulting in the problem that the front-end page is not updated in time, providing page rendering method.

[0036] Such as figure 1 As shown, the specific steps of the method are as follows:

[0037] Step S101 , according to the storage path of the js file corresponding to the client's access request, load the js file into the rendering module.

[0038] In this embodiment, the client may be a browser. When a user opens a browser, or opens a web page, or downloads data, etc., the client sends an access request to ...

Embodiment 2

[0062] figure 2 It is a flow chart of the page rendering method provided by Embodiment 2 of the present invention. On the basis of the first embodiment above, in this embodiment, when the NodeJS service is started, the rendering main process, sub-process container and request queue are created, and the access request sent by the client is received through the rendering main process, and the js corresponding to the access request is obtained. The storage path of the file; and add the access request to the request queue; the rendering main process determines a target sub-process, and hands the access request to the target sub-process for subsequent rendering processing, and the target sub-process sends the final rendering processing result to Render the main process. Such as figure 2 As shown, the specific steps of the method are as follows:

[0063] Step S201, when the NodeJS service starts, create a rendering main process, a sub-process container and a request queue.

[...

Embodiment 3

[0122] image 3 It is a schematic structural diagram of a page rendering processing device provided by Embodiment 3 of the present invention. The page rendering processing apparatus provided in the embodiment of the present invention can execute the processing flow provided in the page rendering processing method embodiment. Such as image 3 As shown, the page rendering processing device 30 includes: a loading module 301 , a cache data updating module 302 and a rendering processing module 303 .

[0123] Specifically, the loading module 301 is configured to load the js file into the rendering module according to the storage path of the js file corresponding to the client's access request.

[0124] The cached data update module 302 is used for: judging whether there is the cached data of the module in the js file in the cache; If it exists, then the cached data whose cached duration exceeds the preset effective duration in the cached data of the module in the js file is delete...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention provides a page rendering processing method, device and equipment and a readable storage medium. According to the method provided by the embodiment of the invention, the method includes: presetting the effective duration of the cache data of the module, and after the js file is loaded into the rendering module according to the storage path of the js file corresponding to the access request of the client, judging whether the cache data of the module in the js file exists in the cache or not; if yes, deleting the cache data of which the cache duration exceeds thepreset effective duration in the cache data of the modules in the js file from the cache, and caching the modules corresponding to the deleted cache data again; if not, caching the modules in the js file. According to the embodiment of the invention, when the module sends the change, the cache data of the module in the cache can be updated in time without restarting the NodeJS service, so that theproblem that a front-end page is not updated in time because the NodeJS service still uses the cache data of the module before the change can be avoided.

Description

technical field [0001] Embodiments of the present invention relate to the technical field of web page rendering, and in particular, to a page rendering processing method, device, device, and readable storage medium. Background technique [0002] NodeJS is a JavaScript runtime environment that enables JavaScript to run without a browser, also known as Node.js. The NodeJS service is built between the front-end and back-end as the middle layer to undertake the functions of converting data, connecting services, and routing design, so as to achieve better decoupling of the front-end and back-end. [0003] At present, the NodeJS service itself has a module cache loading mechanism. When rendering a page, after loading the js file corresponding to the client request into the rendering module, the server will determine whether each module in the js file (the library called inside the js file function or other method) has been cached, if not, then cache each module in the js file; if...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/957
Inventor 葛佳丽
Owner BEIJING DIDI INFINITY TECH & DEV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products