CN108881396B - Network data loading method, device, equipment and computer storage medium - Google Patents

Network data loading method, device, equipment and computer storage medium Download PDF

Info

Publication number
CN108881396B
CN108881396B CN201810511401.1A CN201810511401A CN108881396B CN 108881396 B CN108881396 B CN 108881396B CN 201810511401 A CN201810511401 A CN 201810511401A CN 108881396 B CN108881396 B CN 108881396B
Authority
CN
China
Prior art keywords
page
access request
data
end server
page identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810511401.1A
Other languages
Chinese (zh)
Other versions
CN108881396A (en
Inventor
胡金星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201810511401.1A priority Critical patent/CN108881396B/en
Publication of CN108881396A publication Critical patent/CN108881396A/en
Application granted granted Critical
Publication of CN108881396B publication Critical patent/CN108881396B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/562Brokering proxy services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a network data loading method, which comprises the following steps: the Node server comprises the following steps: receiving an access request sent by a front-end server, and judging whether the access request is a page access request or not; if the page access request is the page access request, acquiring a page identifier in the page access request; judging whether a preset static page identifier set contains the page identifier or not; if the page identifier is included, processing the page access request and sending the page access request to a front-end server; if the page identifier is not included, the page access request is sent to a back-end server; and receiving feedback information sent by the back-end server based on the page access request, and sending the feedback information to the front-end server for rendering by the front-end server to generate a corresponding network page. The invention also discloses a loading device, equipment and a computer storage medium of the network data. The invention improves the data processing efficiency.

Description

Network data loading method, device, equipment and computer storage medium
Technical Field
The present invention relates to the field of network information, and in particular, to a method, an apparatus, a device, and a computer storage medium for loading network data.
Background
With the rapid development of the mobile internet, more and more people acquire data information on the internet, network users rise straight, and personal network resources are in short supply.
Because network users are more, the problems of blocking caused by data channel congestion and the like often occur, meanwhile, under the condition that the network data processing efficiency is constant, the pressure of the server is higher, how to improve the data loading efficiency and how to reduce the pressure of the server become the technical problem to be solved urgently at present.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a method, a device, equipment and a computer storage medium for loading network data, and aims to improve the data processing efficiency.
In order to achieve the above object, the present invention provides a method for loading network data, where the method for loading network data is applied to a Node server, and the method for loading network data includes the following steps:
receiving an access request sent by a front-end server, and judging whether the access request is a page access request or not;
if the access request is a page access request, acquiring a page identifier in the page access request;
judging whether a preset static page identifier set contains the page identifier or not;
if the preset static page identifier set contains the page identifier, processing the page access request and sending the page access request to a front-end server;
if the preset static page identifier set does not contain the page identifier, the page access request is sent to a back-end server;
and receiving feedback information sent by the back-end server based on the page access request, and sending the feedback information to the front-end server so that the front-end server can render and generate a network page corresponding to the page access request.
Optionally, if the preset static page identifier set does not include the page identifier, the step of sending the page access request to a back-end server includes:
if the preset static page identifier set does not contain the page identifier, judging whether a preset dynamic page identifier set contains the page identifier or not;
if the preset dynamic page identifier set contains the page identifier, acquiring a page frame and information to be input, which correspond to the page identifier in local storage;
and adding the information to be input to the page access request, and sending the page access request to a back-end server so that the back-end server loads corresponding dynamic data according to the information to be input, and using the dynamic data and the position of the dynamic data as feedback information.
Optionally, the receiving, by the back-end server, feedback information sent based on the page access request, and sending the feedback information to the front-end server, so that the front-end server renders and generates a web page corresponding to the page access request, includes:
receiving feedback information sent by a back-end server based on the page access request, and acquiring dynamic data in the feedback information and the position of the dynamic data;
splicing the dynamic data with the page frame according to the position of the dynamic data to form page data corresponding to the page access request;
and sending the page data to a front-end server for rendering by the front-end server to generate a network page corresponding to the page access request.
Optionally, if the page identifier is not included in the preset static page identifier set, after the step of determining whether the page identifier is included in the preset dynamic page identifier set, the method includes:
and if the preset dynamic page identifier set does not contain the page identifier, sending the page access request to a back-end server so that the back-end server loads corresponding page data according to the page identifier in the page access request, and using the page data as feedback information.
Optionally, if the preset static page identifier set includes the page identifier, the step of processing the page access request and sending the page access request to a front-end server includes:
if the preset static page identifier set contains the page identifier, acquiring page data corresponding to the page identifier in a local storage;
and sending the page data to a front-end server for rendering by the front-end server to generate a network page corresponding to the page access request.
Optionally, if the preset static page identifier set includes the page identifier, the step of processing the page access request and sending the page access request to a front-end server further includes:
if the preset static page identifier set contains the page identifier, determining the current operation load of the Node server;
comparing the current operating load with a preset load threshold;
if the current operation load exceeds the preset load threshold value, the page access request is sent to a back-end server;
if the current operation load does not exceed the preset load threshold, acquiring page data corresponding to the page identifier in a local storage;
and sending the page data to a front-end server for rendering by the front-end server to generate a network page corresponding to the page access request.
Optionally, after the step of receiving an access request sent by a front-end server and determining whether the access request is a page access request, the method includes:
if the access request is a data access request, inquiring whether local storage has access data corresponding to the data access request;
if the local storage has access data corresponding to the data access request, the access data are sent to a front-end server;
and if the local storage does not have the access data corresponding to the data access request, the data access request is sent to a back-end server so that the back-end server can obtain the corresponding access data according to the data access request.
In addition, in order to achieve the above object, the present invention further provides a network data loading device; the network data loading device is arranged in the Node server, and comprises:
the first judgment module is used for receiving an access request sent by a front-end server and judging whether the access request is a page access request or not;
the identification acquisition module is used for acquiring the page identification in the page access request if the access request is the page access request;
the static processing module is used for processing the page access request and sending the page access request to a front-end server if the preset static page identifier set contains the page identifier;
the second judgment module is used for judging whether a preset static page identifier set contains the page identifier or not;
a request sending module, configured to send the page access request to a back-end server if the preset static page identifier set does not include the page identifier;
and the receiving and sending module is used for receiving feedback information sent by the back-end server based on the page access request, and sending the feedback information to the front-end server so as to render and generate a network page corresponding to the page access request by the front-end server.
In addition, in order to achieve the above object, the present invention further provides a network data loading device;
the loading device of the network data comprises: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein:
the computer program realizes the steps of the method for loading network data as described above when executed by the processor.
In addition, to achieve the above object, the present invention also provides a computer storage medium;
the computer storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the loading method of network data as described above.
The embodiment of the invention provides a method, a device, equipment and a computer storage medium for loading network data, which are applied to a Node server and comprise the following steps: receiving an access request sent by a front-end server, and judging whether the access request is a page access request or not; if the access request is a page access request, acquiring a page identifier in the page access request; judging whether a preset static page identifier set contains the page identifier or not; if the preset static page identifier set does not contain the page identifier, the page access request is sent to a back-end server; and receiving feedback information sent by the back-end server based on the page access request, and sending the feedback information to the front-end server so that the front-end server can render and generate a network page corresponding to the page access request. In the application, a Node server is added on a back-end server and a front-end server, the Node server requests and forwards the access request of the front end, namely, when the page access request is determined to be the page access request of a static page, the Node server intercepts the page access request and processes the page access request on the Node server, the processing pressure of the back-end server is reduced, the processing efficiency is improved under the condition that the total quantity processing quantity is not changed, when the page access request is determined to be the page access request of a dynamic page, the Node server serves as an intermediate layer to realize millisecond-level data transmission between the front-end server and the back-end server, the speed bottleneck that the front-end server directly requests the back-end server is solved, the Node server has natural advantages for high concurrency, and the load of the server is reduced.
Drawings
FIG. 1 is a schematic diagram of an apparatus in a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a specific scenario in which the network data loading method of the present invention is applied;
fig. 3 is a flowchart illustrating a first embodiment of a method for loading network data according to the present invention;
fig. 4 is a flowchart illustrating a third embodiment of a method for loading network data according to the present invention;
fig. 5 is a functional module diagram of an embodiment of a network data loading device according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a Node server (also called network data loading device or server, where the network data loading device may be formed by a separate network data loading apparatus, or may be formed by combining other apparatuses and a network data loading apparatus) in a hardware operating environment according to an embodiment of the present invention. Referring to fig. 2, the Node server in this embodiment is disposed between the back-end server and the front-end server, and this embodiment is a complete set of server rendering solution based on koa framework and reactive-router (real-router).
The Node server in the embodiment of the present invention refers to a computer that manages resources and provides services for users, and a computer or a computer system running the above software is also referred to as a server. Compared with a common PC (personal computer), the Node server has higher requirements on stability, safety, performance and the like; as shown in fig. 1, the Node server may include: a processor 1001, such as a Central Processing Unit (CPU), a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002, a chipset, a disk system, a network, and other hardware. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., WIFI interface, WIreless FIdelity, WIFI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the Node server may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, and a WiFi module; the input unit is compared with a display screen and a touch screen; the network interface can be selected from Bluetooth, a probe, 3G/4G/5G (the former numbers indicate the algebra of the cellular mobile communication network, namely the network of the first generation, and the English letter G indicates the generation) networking base station equipment and the like except WiFi in the wireless interface. Those skilled in the art will appreciate that the Node server architecture shown in fig. 1 does not constitute a limitation of the Node server and may include more or less components than those shown, or combine certain components, or a different arrangement of components.
As shown in fig. 1, the computer software product is stored in a storage medium (storage medium: also called computer storage medium, computer medium, readable storage medium, computer readable storage medium, or direct medium, such as RAM, magnetic disk, optical disk), and includes several instructions for a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention, and a memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a computer program.
In the Node server shown in fig. 1, the network interface 1004 is mainly used for connecting to a background local storage (also called a background database) and performing data communication with the background database; the user interface 1003 is mainly used for connecting a client (the client is also called a terminal) and performing data communication with the client; and the processor 1001 may be configured to call the computer program stored in the memory 1005 and execute the steps in the network data loading method provided by the following embodiment of the present invention.
Referring to fig. 3, in a first embodiment of the method for loading network data according to the present invention, the method for loading network data includes:
step S10, receiving an access request sent by the front-end server, and determining whether the access request is a page access request.
The method comprises the steps that a user triggers an access request on a terminal (or a front-end server), the front-end server receives the access request and forwards the access request to a Node server, the Node server receives the access request sent by the front-end server and judges whether the access request is a page access request, namely, the Node server obtains access information contained in the access request and determines whether the access request is the page access request according to the access information.
It should be noted that, in the present application, an access request is divided into a page access request and a data access request, where the page access request refers to a user accessing data information with a frame, for example, a page of application software, the data access request refers to data information that needs to be acquired from a network database, and the data information of this type changes in real time; the page access request also comprises a static page access request and a dynamic page access request, the static page access refers to that the accessed data information is invariable for a period of time, for example, the first page information of a website, and the dynamic page access request refers to that the accessed data information comprises a page frame which is invariable for a period of time and also comprises dynamic data information which changes in real time.
Step S20, if the access request is a page access request, obtain a page identifier in the page access request.
And the Node server determines that the access request is a page access request according to the access information in the access request, and then the Node server acquires a page identifier in the page access request, wherein the page identifier refers to information capable of uniquely identifying a page.
Step S30, determine whether the preset static page identifier set includes the page identifier.
The Node server compares the acquired page identifier with a static page identifier in a preset static page identifier set (wherein the preset static page identifier set refers to a set which is preset and comprises all static page identifiers), if a static page identifier matched with the page identifier in the page access request exists in the static page identifier set, namely the preset static page identifier set comprises the page identifier, the Node server judges that an access page corresponding to the page access request is a static page, if the static page identifier set does not have the static page identifier matched with the page identifier in the page access request, namely the preset static page identifier set does not contain the page identifier, and the Node server judges that the access page corresponding to the page access request is a dynamic page.
Step S40, if the preset static page identifier set includes the page identifier, processing the page access request, and sending the page access request to a front-end server.
If the preset static page identifier set contains the page identifier, the Node server judges that the user accesses the static page, the Node server intercepts a page access request and does not send the page access request to a back-end server, and the Node server processes the page access request, namely, the Node server acquires page data corresponding to the page identifier in local storage of the Node server and sends the page data to a front-end server.
Further, step S40 includes:
step a, if the preset static page identifier set contains the page identifier, acquiring page data corresponding to the page identifier in a local storage.
And b, sending the page data to a front-end server for rendering by the front-end server to generate a network page corresponding to the page access request.
If the preset static page identifier set comprises the page identifier in the page access request, the Node server judges whether the user accesses a static page, and the Node server acquires page data corresponding to the page identifier in a local storage corresponding to the Node server (wherein the page data of the static page is stored in the local storage corresponding to the Node server in advance); and the Node server sends the page data to a front-end server so that the front-end server can render and generate a network page corresponding to the page access request.
In this embodiment, when it is determined that an access page corresponding to a page access request is a static page, the Node server obtains page information corresponding to a locally stored page identifier and sends the page information to the front-end server, and the Node server does not need to repeatedly load the static page information, thereby reducing the waste of network resources, meanwhile, because the Node server sets a plurality of idle threads in advance according to the running state of the CPU, and the Node server supports simultaneous execution of a plurality of threads, a state of thread blocking rarely occurs, i.e., the Node server can quickly respond when receiving the page access request, in the prior art, when receiving the page access request of a user, because the front-end server is directly connected with the back-end server, the back-end server is usually operated in a single thread, and when having a plurality of access requests, the operations of the threads need to be ordered, even the thread blocking state occurs, in this embodiment, the Node server can perform multi-thread operation, which solves the speed bottleneck of the front end directly requesting the back end server, and improves the data loading efficiency.
Step S50, if the preset static page identifier set does not include the page identifier, sending the page access request to a back-end server.
If the preset static page identifier set does not contain the page identifier, the Node server determines that an access page corresponding to the page access request is a dynamic page, and the Node server sends the page access request to a back-end server, so that the back-end server loads data information corresponding to the page access request according to the received page access request, wherein the data information corresponding to the page access request loaded by the back-end server is implemented in different ways, for example, the first way: the back-end server loads all the page data corresponding to the page identification, sends all the page data as feedback information and sends the feedback information to the Node server; the second method comprises the following steps: and the back-end server loads dynamic data in the page data corresponding to the identifier and sends the dynamic data serving as feedback information to the Node server.
Step S60, receiving feedback information sent by the back-end server based on the page access request, and sending the feedback information to the front-end server, so that the front-end server renders and generates a web page corresponding to the page access request.
The Node server receives feedback information sent by the back-end server based on the page access request, the Node server receives the feedback information, determines whether the Node server can directly render and generate a corresponding network page according to the feedback information, if the Node server can directly render and generate the corresponding network page according to the feedback information, determines that the back-end server is all page data loaded in a first mode, and the Node server directly sends the feedback information to the front-end server so that the front-end server can render and directly generate the network page corresponding to the page access request according to the feedback information; if the Node server can not directly render and generate the corresponding network page according to the feedback information, determining that the back-end server is dynamic data loaded in the mode two, the Node server acquires a page frame (the page frame is also called public data or static data) corresponding to the page identifier in the local storage corresponding to the Node server, the Node server splices the dynamic data corresponding to the feedback information with the page frame data to obtain complete page data, and the Node server sends the complete page data to the front-end server so as to render and generate the network page corresponding to the page access request according to the complete page data through the front-end server.
In this embodiment, a Node server is added to the back-end server and the front-end server, the Node server requests and forwards the front-end access request, and the Node server serves as an intermediate layer to realize millisecond data transmission between the front-end server and the back-end server, so that the speed bottleneck that the front-end server directly requests the back-end server is solved, the Node server has natural advantages for high concurrency, and the load of the server is reduced.
Further, the present embodiment is proposed on the basis of the first example, and is a refinement of step S40 in the first embodiment.
In this embodiment, the method for loading network data includes:
step S41, if the preset static page identifier set includes the page identifier, determining the current operation load of the Node server.
If the preset static page identifier set contains the page identifier, the Node server judges that the user accesses the static page, and the Node server determines the current operation load of the Node server, wherein the current operation load refers to the load of a CPU (central processing unit) of the Node server, namely, whether the hardware of the Node server supports the current access amount is determined through the current operation load of the Node server.
And step S42, comparing the current operation load with a preset load threshold value.
And comparing the current operation load with a preset load threshold, wherein the preset load threshold is a Node server operation load critical value set according to the actual operation condition of the Node server, and if the current operation load exceeds the preset load threshold, judging that the operation pressure of the Node server is overlarge.
Step S43, if the current operating load exceeds the preset load threshold, sending the page access request to a back-end server.
If the current operation load exceeds the preset load threshold value, judging that the operation pressure of the Node server is overlarge, sending the page access request to a back-end server by the Node server, and processing part of the page access request by the back-end server to realize load balancing.
Step S44, if the current operating load does not exceed the preset load threshold, acquiring page data corresponding to the page identifier in the local storage.
And if the current operation load does not exceed the preset load threshold, judging that the Node server is in a normal operation condition, and acquiring the page data corresponding to the page identifier in the local storage by the Node server.
And step S45, sending the page data to a front-end server for rendering by the front-end server to generate a network page corresponding to the page access request.
And the Node server sends the page data to a front-end server so that the front-end server can render and generate a network page corresponding to the page access request.
In this embodiment, the operation status of the Node server is monitored, the abnormality of the Node server is found in time, and when the load pressure of the Node server is too high, the page access request processed by the Node server is sent to the back-end server.
Further, on the basis of the first embodiment of the present invention, a second embodiment of the method for loading network data of the present invention is provided, and this embodiment specifically describes a processing manner for loading page data when an access page corresponding to a page access request is a dynamic page.
The present embodiment is a refinement of step S50 in the first embodiment, and specifically, the method for loading network data further includes:
step S51, if the preset static page identifier set does not include the page identifier, determine whether a preset dynamic page identifier set includes the page identifier.
If the Node server determines that the page corresponding to the page access request is a dynamic page after comparing the page identifier in the page access request with the static page identifier in the preset static page identifier set, the Node server compares the page identifier in the page access request with the dynamic page identifier in the preset dynamic page identifier set, and if the page identifier is matched with the dynamic page identifier in the preset dynamic page identifier set, the preset dynamic page identifier set is determined to contain the page identifier; and if the page identifier is not matched with the dynamic page identifier in the preset dynamic page identifier set, determining that the page identifier is not contained in the preset dynamic page identifier set.
In this embodiment, the dynamic page included in the preset dynamic page identifier set is determined according to a ratio of a data amount of dynamic data in the dynamic page to a data amount of a page frame (the page frame is also called as public data or static data), and specifically, the preset dynamic page identifier set in this embodiment includes dynamic page identifier information in which a ratio of the data amount of the dynamic data to the data amount of the public data is lower than a preset value (the preset value is set according to a specific situation, for example, the preset value is set to 10%).
For example, in web page 1: the dynamic data has 100 characters, the page frame has 2000 characters, the ratio of the data volume of the dynamic data to the data volume of the public data is 5%, the ratio of the data volume of the dynamic data to the data volume of the public data is lower than 10%, and the preset dynamic page identifier set comprises the page identifier of the network page 1; in web page 2: the dynamic data has 1000 characters, the page frame has 2000 characters, the ratio of the data amount of the dynamic data to the data amount of the public data is 50%, the ratio of the data amount of the dynamic data to the data amount of the public data is higher than 10%, and the preset dynamic page identifier set does not include the page identifier of the web page 2.
Specifically, the method further includes, after step S51:
step S52, if the preset dynamic page identifier set does not include the page identifier, sending the page access request to a back-end server, so that the back-end server loads corresponding page data according to the page identifier in the page access request, and uses the page data as feedback information.
If the preset dynamic page identifier set does not contain the page identifier, the Node server determines that the ratio of the data volume of the dynamic data in the page corresponding to the page identifier to the data volume of the public data is higher, a local storage of the Node server does not have a page frame corresponding to the page identifier, and the Node server sends the page access request to a back-end server so that the back-end server loads the corresponding page data according to the page identifier in the page access request and uses the page data as feedback information.
In this embodiment, a source of the number of pages to be loaded is determined according to a ratio of the data volume of the dynamic data to the data volume of the page frame, that is, when the ratio of the data volume of the dynamic data to the data volume of the public data is high, the Node server directly sends a page access request to the back-end server, and the back-end server directly loads all page data corresponding to the page identifier, so as to accelerate the page rendering efficiency.
Step S53, if the preset dynamic page identifier set includes the page identifier, acquiring a page frame and information to be input corresponding to the page identifier in a local storage.
If the dynamic page identifier set comprises a page identifier, the local storage of the Node server comprises a page frame corresponding to the page identifier and information to be input, and the Node server acquires the page frame corresponding to the page identifier in the local storage and the information to be input; the information to be input refers to information such as the type and position of dynamic data to be input in the page frame.
Step S54, adding the information to be input to the page access request, and sending the page access request to a back-end server, so that the back-end server loads corresponding dynamic data according to the information to be input, and uses the dynamic data and the position of the dynamic data as feedback information.
The Node server adds information to be input to the page access request, sends the page access request carrying the information to be input to a back-end server so that the back-end server can load corresponding dynamic data according to the information to be input, and takes the dynamic data and the position of the dynamic data as feedback information.
Step S61, receiving feedback information sent by the back-end server based on the page access request, and acquiring the dynamic data in the feedback information and the position of the dynamic data.
And the Node server receives feedback information sent by the back-end server based on the page access request, and acquires the dynamic data and the position of the dynamic data in the feedback information so that the Node server performs data splicing according to the dynamic data and the position of the dynamic data.
And step S62, splicing the dynamic data and the page frame according to the position of the dynamic data to form page data corresponding to the page access request.
The Node server splices the dynamic data with the page frame according to the position of the dynamic data to form page data corresponding to the page access request, for example, the Node server inputs the dynamic data sent by the back-end server to the position corresponding to the data to be input to form complete page information corresponding to the page access request.
And step S63, sending the page data to a front-end server for rendering by the front-end server to generate a network page corresponding to the page access request.
And the Node server sends the page data to a front-end server so that the front-end server can render and generate a network page corresponding to the page access request.
In this embodiment, the Node server splices the page frame in the local storage corresponding to the Node server with the dynamic data loaded by the back-end server, the back-end server only needs to load less dynamic data, so that the waste of network resources is reduced, the Node server sends the assembled page to the front-end server, and the bottleneck of the speed of the front-end for page rendering is solved.
Further, referring to fig. 4, in a third embodiment of the method for loading network data according to the present invention, when the access request is not a page access request but a data access request, the method for loading network data of the Node server includes:
step S70, if the access request is a data access request, querying whether the local storage has access data corresponding to the data access request.
If the Node server determines that the access request is a data access request, inquiring whether the local storage has access data corresponding to the data access request, namely, the Node server firstly inquires whether the local storage corresponding to the Node server contains the access data corresponding to the data access request.
And step S80, if the local storage has access data corresponding to the data access request, sending the access data to the front-end server.
And if the local storage has the data information corresponding to the data access request, the Node server sends the data information to the front-end server.
In this embodiment, it may further be determined whether data information included in the local storage corresponding to the Node server is complete access data corresponding to the data access request, and if the data information in the local storage of the Node is not complete access data, a partial loading method may be adopted, where a partial loading manner of the Node server may be combined with a processing manner corresponding to the page access request in the present application.
Step S90, if the local storage does not have the access data corresponding to the data access request, sending the data access request to a back-end server, so that the back-end server obtains the corresponding access data according to the data access request.
And if the local storage corresponding to the Node server does not have the access data corresponding to the data access request, sending the data access request to a back-end server so that the back-end server can obtain the corresponding access data according to the data access request.
In this embodiment, the local storage in the Node server is first queried in the data access request, and when it is determined that the local storage does not contain corresponding data information, the local storage is sent to the back-end server to load the data information, so as to reduce the waste of network resources.
In addition, referring to fig. 5, an embodiment of the present invention further provides a device for loading network data, where the device for loading network data includes:
the first judging module 10 is configured to receive an access request sent by a front-end server, and judge whether the access request is a page access request;
an identifier obtaining module 20, configured to obtain a page identifier in the page access request if the access request is a page access request;
the static processing module 30 is configured to process the page access request and send the page access request to a front-end server if the preset static page identifier set includes the page identifier;
a second determining module 40, configured to determine whether a preset static page identifier set includes the page identifier;
a request sending module 50, configured to send the page access request to a back-end server if the preset static page identifier set does not include the page identifier;
and a receiving and sending module 60, configured to receive feedback information sent by the back-end server based on the page access request, and send the feedback information to the front-end server, so that the front-end server renders and generates a network page corresponding to the page access request.
Further, the request sending module 50 includes:
a determining unit, configured to determine whether a preset dynamic page identifier set includes the page identifier if the preset static page identifier set does not include the page identifier;
a frame obtaining unit, configured to obtain a page frame and information to be input, where the page frame corresponds to the page identifier in a local storage, if the preset dynamic page identifier set includes the page identifier;
an information determination unit for;
and the first sending unit is used for adding the information to be input to the page access request, sending the page access request to a back-end server, loading corresponding dynamic data by the back-end server according to the information to be input, and taking the dynamic data and the position of the dynamic data as feedback information.
Further, the receiving and sending module 60 includes:
the receiving and acquiring unit is used for receiving feedback information sent by a back-end server based on the page access request, and acquiring dynamic data in the feedback information and the position of the dynamic data;
the data splicing unit is used for splicing the dynamic data and the page frame according to the position of the dynamic data to form page data corresponding to the page access request;
and the sending unit is used for sending the page data to a front-end server so as to render and generate a network page corresponding to the page access request by the front-end server.
Further, the request sending module 50 further includes:
and the second sending unit is used for requesting that if the preset dynamic page identifier set does not contain the page identifier, the page access request is sent to a back-end server so that the back-end server can load corresponding page data according to the page identifier in the page access request, and the page data is used as feedback information.
Further, the static processing module 30 includes:
the data acquisition unit is used for acquiring page data corresponding to the page identifier in a local storage if the preset static page identifier set contains the page identifier;
and the data sending unit is used for sending the page data to a front-end server so as to render and generate a network page corresponding to the page access request by the front-end server.
Further, the static processing module 30 further includes:
a load determining unit, configured to determine a current operating load of the Node server if the preset static page identifier set includes the page identifier;
the load comparison unit is used for comparing the current operation load with a preset load threshold value;
if the current operation load exceeds the preset load threshold value, the page access request is sent to a back-end server;
the data acquisition unit is used for acquiring page data corresponding to the page identifier in a local storage if the current operating load does not exceed the preset load threshold;
and the data sending unit is used for sending the page data to a front-end server so as to render and generate a network page corresponding to the page access request by the front-end server.
Further, the loading device of the network data includes:
the data query module is used for querying whether local storage has access data corresponding to the data access request if the access request is the data access request;
the first sending module is used for sending the access data to the front-end server if the local storage has the access data corresponding to the data access request;
and the second sending module is used for sending the data access request to a back-end server if the local storage does not have the access data corresponding to the data access request, so that the back-end server can obtain the corresponding access data according to the data access request.
The steps implemented by each functional module of the network data loading device may refer to each embodiment of the network data loading method of the present invention, and are not described herein again.
In addition, the embodiment of the invention also provides a computer storage medium.
The computer storage medium stores thereon a computer program, which when executed by a processor implements the operations in the loading method of network data provided by the above-described embodiments.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity/action/object from another entity/action/object without necessarily requiring or implying any actual such relationship or order between such entities/actions/objects; the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A method for loading network data is characterized in that the method for loading network data is applied to a Node server, and comprises the following steps:
receiving an access request sent by a front-end server, and judging whether the access request is a page access request or not;
if the access request is a page access request, acquiring a page identifier in the page access request;
judging whether a preset static page identifier set contains the page identifier or not;
if the preset static page identifier set contains the page identifier, processing the page access request and sending the page access request to a front-end server;
if the preset static page identifier set does not contain the page identifier, the page access request is sent to a back-end server;
receiving feedback information sent by a back-end server based on the page access request, and sending the feedback information to a front-end server for rendering by the front-end server to generate a network page corresponding to the page access request;
if the preset static page identifier set contains the page identifier, the step of processing the page access request and sending the page access request to a front-end server comprises the following steps:
if the preset static page identifier set contains the page identifier, acquiring page data corresponding to the page identifier in a local storage;
and sending the page data to a front-end server for rendering by the front-end server to generate a network page corresponding to the page access request.
2. The method for loading network data according to claim 1, wherein the step of sending the page access request to a backend server if the preset static page identifier set does not include the page identifier comprises:
if the preset static page identifier set does not contain the page identifier, judging whether a preset dynamic page identifier set contains the page identifier or not;
if the preset dynamic page identifier set contains the page identifier, acquiring a page frame and information to be input, which correspond to the page identifier in local storage;
and adding the information to be input to the page access request, and sending the page access request to a back-end server so that the back-end server loads corresponding dynamic data according to the information to be input, and using the dynamic data and the position of the dynamic data as feedback information.
3. The method for loading network data according to claim 2, wherein the step of receiving the feedback information sent by the back-end server based on the page access request, and sending the feedback information to the front-end server for the front-end server to render and generate the network page corresponding to the page access request includes:
receiving feedback information sent by a back-end server based on the page access request, and acquiring dynamic data in the feedback information and the position of the dynamic data;
splicing the dynamic data with the page frame according to the position of the dynamic data to form page data corresponding to the page access request;
and sending the page data to a front-end server for rendering by the front-end server to generate a network page corresponding to the page access request.
4. The method for loading network data according to claim 2, wherein, if the preset static page identifier set does not include the page identifier, the step of determining whether the preset dynamic page identifier set includes the page identifier comprises:
and if the preset dynamic page identifier set does not contain the page identifier, sending the page access request to a back-end server so that the back-end server loads corresponding page data according to the page identifier in the page access request, and using the page data as feedback information.
5. The method for loading network data according to claim 1, wherein if the preset static page identifier set includes the page identifier, the step of processing the page access request and sending the page access request to a front-end server further includes:
if the preset static page identifier set contains the page identifier, determining the current operation load of the Node server;
comparing the current operating load with a preset load threshold;
if the current operation load exceeds the preset load threshold value, the page access request is sent to a back-end server;
if the current operation load does not exceed the preset load threshold, acquiring page data corresponding to the page identifier in a local storage;
and sending the page data to a front-end server for rendering by the front-end server to generate a network page corresponding to the page access request.
6. The method for loading network data according to claim 1, wherein after the step of receiving the access request sent by the front-end server and determining whether the access request is a page access request, the method comprises:
if the access request is a data access request, inquiring whether local storage has access data corresponding to the data access request;
if the local storage has access data corresponding to the data access request, the access data are sent to a front-end server;
and if the local storage does not have the access data corresponding to the data access request, the data access request is sent to a back-end server so that the back-end server can obtain the corresponding access data according to the data access request.
7. A network data loading device is characterized in that the network data loading device is arranged in a Node server, and the network data loading device comprises:
the first judgment module is used for receiving an access request sent by a front-end server and judging whether the access request is a page access request or not;
the identification acquisition module is used for acquiring the page identification in the page access request if the access request is the page access request;
the second judgment module is used for judging whether a preset static page identifier set contains the page identifier or not;
the static processing module is used for processing the page access request and sending the page access request to a front-end server if the preset static page identifier set contains the page identifier;
a request sending module, configured to send the page access request to a back-end server if the preset static page identifier set does not include the page identifier;
the receiving and sending module is used for receiving feedback information sent by the back-end server based on the page access request, and sending the feedback information to the front-end server so as to render and generate a network page corresponding to the page access request by the front-end server;
the static processing module is further configured to:
if the preset static page identifier set contains the page identifier, acquiring page data corresponding to the page identifier in a local storage;
and sending the page data to a front-end server for rendering by the front-end server to generate a network page corresponding to the page access request.
8. A device for loading network data, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein:
the computer program, when being executed by the processor, realizes the steps of the method of loading network data according to any one of claims 1 to 6.
9. A computer storage medium, characterized in that the computer storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the loading method of network data according to any one of claims 1 to 6.
CN201810511401.1A 2018-05-24 2018-05-24 Network data loading method, device, equipment and computer storage medium Active CN108881396B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810511401.1A CN108881396B (en) 2018-05-24 2018-05-24 Network data loading method, device, equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810511401.1A CN108881396B (en) 2018-05-24 2018-05-24 Network data loading method, device, equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN108881396A CN108881396A (en) 2018-11-23
CN108881396B true CN108881396B (en) 2022-04-15

Family

ID=64333845

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810511401.1A Active CN108881396B (en) 2018-05-24 2018-05-24 Network data loading method, device, equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN108881396B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109885791A (en) * 2019-01-03 2019-06-14 深圳壹账通智能科技有限公司 A kind of front end page access method, device and electronic equipment
CN112015406A (en) * 2019-05-31 2020-12-01 阿里巴巴集团控股有限公司 Data processing method, page access method, device, terminal and server
CN110598149A (en) * 2019-08-15 2019-12-20 平安普惠企业管理有限公司 Webpage access method, device and storage medium
CN110909271A (en) * 2019-11-11 2020-03-24 青岛海信移动通信技术股份有限公司 Communication terminal, server interconnected with communication terminal and control method
CN110990746A (en) * 2019-12-06 2020-04-10 北京同邦卓益科技有限公司 Page loading method, device, system, storage medium and electronic equipment
CN111177624B (en) * 2019-12-24 2023-11-14 浙江大搜车软件技术有限公司 Website front-end and back-end communication method, device, computer equipment and storage medium
CN113569172A (en) * 2020-04-29 2021-10-29 北京金山云网络技术有限公司 Data interaction method and device and data service platform
CN111586434B (en) * 2020-05-06 2022-07-15 北京世纪好未来教育科技有限公司 Load balancing method based on edge device and distributed mixed screen server
CN111881394B (en) * 2020-07-28 2024-01-12 万商云集(成都)科技股份有限公司 Request processing method and system for application middle layer
CN112202784B (en) * 2020-09-30 2023-04-18 成都新潮传媒集团有限公司 Anti-crawler method and device and storage medium
CN112464129A (en) * 2020-11-09 2021-03-09 广东华兴银行股份有限公司 Secure communication method, device and medium for loading H5 page request
CN112528274B (en) * 2020-12-24 2023-09-22 微医云(杭州)控股有限公司 Data processing method, device, electronic equipment and storage medium
CN113315822B (en) * 2021-05-21 2023-06-20 福建天泉教育科技有限公司 Page staticizing method and system under front-end and back-end separation architecture

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6622168B1 (en) * 2000-04-10 2003-09-16 Chutney Technologies, Inc. Dynamic page generation acceleration using component-level caching
CN1479221A (en) * 2003-08-01 2004-03-03 威盛电子股份有限公司 Management method and device of translanguage enterprise network station data and its storage medium
CN103338236A (en) * 2013-06-06 2013-10-02 合一网络技术(北京)有限公司 Concurrent data acquisition method and concurrent data acquisition system
CN103778236A (en) * 2014-01-26 2014-05-07 网宿科技股份有限公司 Webpage data distribution processing method and device as well as webpage generation processing method and device
CN104753965A (en) * 2013-12-25 2015-07-01 中国电信股份有限公司 Web acceleration method and system
CN105095260A (en) * 2014-05-08 2015-11-25 广州爱九游信息技术有限公司 Webpage processing method and device aiming at search engine optimization
CN105450579A (en) * 2014-05-30 2016-03-30 广州市动景计算机科技有限公司 Network resource preloading method, client, and middleware server
US9363329B1 (en) * 2013-03-15 2016-06-07 Instart Logic, Inc. Identifying correlated components of dynamic content
CN106202547A (en) * 2016-07-26 2016-12-07 努比亚技术有限公司 A kind of station field signal method, device and a kind of web station system
CN106936727A (en) * 2015-12-30 2017-07-07 中国移动通信集团云南有限公司 A kind of Webpage display process and device
CN107071066A (en) * 2017-06-07 2017-08-18 北京潘达互娱科技有限公司 page access method and device
CN107590145A (en) * 2016-07-06 2018-01-16 北京神州泰岳软件股份有限公司 A kind for the treatment of method and apparatus of page static resource

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050177612A1 (en) * 2004-01-08 2005-08-11 Chi Duong System and method for dynamically quiescing applications
US20060070022A1 (en) * 2004-09-29 2006-03-30 International Business Machines Corporation URL mapping with shadow page support
US20080301146A1 (en) * 2007-05-31 2008-12-04 Research In Motion Limited System and method for efficient dynamic and connectivity aware web page rendering
EP3249545B1 (en) * 2011-12-14 2022-02-09 Level 3 Communications, LLC Content delivery network
US20160191658A1 (en) * 2013-03-15 2016-06-30 Instart Logic, Inc. Efficient delivery of webpages
US9832200B2 (en) * 2015-12-14 2017-11-28 Bank Of America Corporation Multi-tiered protection platform

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6622168B1 (en) * 2000-04-10 2003-09-16 Chutney Technologies, Inc. Dynamic page generation acceleration using component-level caching
CN1479221A (en) * 2003-08-01 2004-03-03 威盛电子股份有限公司 Management method and device of translanguage enterprise network station data and its storage medium
US9363329B1 (en) * 2013-03-15 2016-06-07 Instart Logic, Inc. Identifying correlated components of dynamic content
CN103338236A (en) * 2013-06-06 2013-10-02 合一网络技术(北京)有限公司 Concurrent data acquisition method and concurrent data acquisition system
CN104753965A (en) * 2013-12-25 2015-07-01 中国电信股份有限公司 Web acceleration method and system
CN103778236A (en) * 2014-01-26 2014-05-07 网宿科技股份有限公司 Webpage data distribution processing method and device as well as webpage generation processing method and device
CN105095260A (en) * 2014-05-08 2015-11-25 广州爱九游信息技术有限公司 Webpage processing method and device aiming at search engine optimization
CN105450579A (en) * 2014-05-30 2016-03-30 广州市动景计算机科技有限公司 Network resource preloading method, client, and middleware server
CN106936727A (en) * 2015-12-30 2017-07-07 中国移动通信集团云南有限公司 A kind of Webpage display process and device
CN107590145A (en) * 2016-07-06 2018-01-16 北京神州泰岳软件股份有限公司 A kind for the treatment of method and apparatus of page static resource
CN106202547A (en) * 2016-07-26 2016-12-07 努比亚技术有限公司 A kind of station field signal method, device and a kind of web station system
CN107071066A (en) * 2017-06-07 2017-08-18 北京潘达互娱科技有限公司 page access method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"Intelligent preloading of websites resources based on clustering web user sessions";Lukas Cegan;《2015 5th International Conference on IT Convergence and Security (ICITCS)》;20151008;全文 *
"node中间层";范仁义;《https://www.cnblogs.com/Renyi-Fan/p/9004177.html》;20180507;全文 *
"基于nodejs的微博系统的设计与实现";王越;《万方数据库》;20140917;全文 *

Also Published As

Publication number Publication date
CN108881396A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
CN108881396B (en) Network data loading method, device, equipment and computer storage medium
CN110347560B (en) Method, device, system, equipment and medium for prompting abnormity of big data product
CN111092877B (en) Data processing method and device, electronic equipment and storage medium
US20190102351A1 (en) Generating configuration information for obtaining web resources
CN106059825A (en) Distributed system and configuration method
CN111538885B (en) Page monitoring method and device, electronic equipment and storage medium
CN104754073A (en) Resource access method and device
US11882154B2 (en) Template representation of security resources
CN111083219A (en) Request processing method, device, equipment and computer readable storage medium
CN111124544A (en) Interface display method and device, electronic equipment and storage medium
CN113282392A (en) Interface service calling method and device, electronic equipment and storage medium
CN110929131A (en) Data export method, device, equipment and storage medium
CN111131442B (en) Webpage data monitoring method, terminal equipment and readable storage medium
CN114553762A (en) Method and device for processing flow table items in flow table
CN108415767B (en) Server thread control method, device, equipment and readable storage medium
CN112969206A (en) Terminal application layer network management method, device, equipment and computer storage medium
CN111382141B (en) Master-slave architecture configuration method, device, equipment and computer readable storage medium
CN109951549B (en) Network page access method and device and computer readable storage medium
CN111736761A (en) Data distribution method, device, storage system and computer readable storage medium
CN116776030A (en) Gray release method, device, computer equipment and storage medium
WO2022135410A1 (en) Method and apparatus for loading source file
CN109684156B (en) Monitoring method, device, terminal and storage medium based on mixed mode application
CN114356713A (en) Thread pool monitoring method and device, electronic equipment and storage medium
CN110162374B (en) Theme switching method, device, equipment and computer readable storage medium
US10878187B1 (en) Network-based content rendering

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