CN112764759A - Method and system for dynamically adding or refreshing webpage - Google Patents
Method and system for dynamically adding or refreshing webpage Download PDFInfo
- Publication number
- CN112764759A CN112764759A CN202110081892.2A CN202110081892A CN112764759A CN 112764759 A CN112764759 A CN 112764759A CN 202110081892 A CN202110081892 A CN 202110081892A CN 112764759 A CN112764759 A CN 112764759A
- Authority
- CN
- China
- Prior art keywords
- webpage
- server
- script language
- image
- downloading
- 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
- 238000000034 method Methods 0.000 title claims abstract description 20
- 230000005540 biological transmission Effects 0.000 claims description 19
- 230000000694 effects Effects 0.000 claims description 10
- 230000004048 modification Effects 0.000 description 6
- 238000012986 modification Methods 0.000 description 6
- 238000007726 management method Methods 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
-
- 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/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44568—Immediately runnable code
- G06F9/44578—Preparing or optimising for loading
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention provides a method and a system for dynamically adding or refreshing a webpage, wherein the method comprises the following steps: acquiring all webpage codes, and compiling the webpage codes to form a script language; uploading the formed script language to a server, and configuring a page list corresponding to the script language; a user opens a website by using a browser, accesses a webpage and downloads a script language to the local; when the webpage is accessed again, the webpage is directly accessed by reading from the local script language; the webpage is stored locally in a script language form, the loading efficiency is high next time, the loading speed is higher, problems occur on the webpage, the whole package is not needed to be modified, a certain module or a certain part of codes can be modified in a silent mode, the webpage is newly added with the webpage, the client can directly receive the webpage, the webpage is directly used on the premise that manual refreshing is not needed, and the webpage does not need to be refreshed manually and can be refreshed automatically.
Description
Technical Field
The invention relates to the field of data storage, in particular to a method and a system for dynamically adding or refreshing a webpage.
Background
When a webpage is released at present, most of the pages are directly placed on a server, then after the webpage is opened through a URL and a problem occurs or the webpage is newly added, most of the pages need to be manually refreshed, the page is up to date, and the method is very inconvenient, and many users cannot well execute manual refreshing, so that the problem always exists or the page code is not up to date.
Disclosure of Invention
In order to solve the problems, the invention provides a method and a system for dynamically adding or refreshing a webpage, wherein the method comprises the following steps:
acquiring all webpage codes, and compiling the webpage codes to form a script language;
uploading the formed script language to a server, and configuring a page list corresponding to the script language;
a user opens a website by using a browser, accesses a webpage and downloads a script language to the local;
when the webpage is accessed again, the webpage is directly accessed by reading from the local script language.
Further, the acquiring all web page codes and compiling the web page codes into a script language includes:
acquiring a parent image of the webpage image, and extracting at least one sub-image of the webpage code to be generated from the parent image; taking the sub-image or optional one sub-image designated by a user as the webpage image to be processed;
determining a webpage image sample matched with the webpage image from a preset webpage image sample library;
determining a webpage code corresponding to one webpage image sample until all webpage codes in the father image are obtained;
and compiling all the acquired webpage codes to form a script language.
Further, the uploading the formed script language to the server and configuring the page list corresponding to the script language includes:
uploading the formed script language to a server, and reading configuration information in a server configuration table;
and configuring a page list corresponding to the script language according to the configuration information in the service configuration table.
Further, the user opens a website by using a browser, accesses a webpage, and downloads a script language to the local, including:
configuring a managed URL access resource and a URL access strategy on a server;
when a user accesses a network through a user terminal URL server, the server issues an access strategy of the configured user URL to the user terminal, and the subsequent URL access of the user judges whether the user is allowed to carry out URL access or not according to the issued URL access strategy;
and when URL access is allowed, accessing a webpage, and setting a downloading strategy for downloading the script language, wherein the downloading strategy comprises adding a configuration file for downloading the script language under a root directory of an application program, downloading the script language according to the downloading strategy, and storing the script language to the local.
Further, when the web page is accessed again, the access to the web page is directly realized by reading from the local scripting language, which includes:
firstly, a socket connection is established between a user side and a server side, and the server side adjusts the balanced load capacity of the server according to an adjustment coefficient, wherein the adjustment coefficient is calculated according to the following formula:
in the above formula, λ represents an adjustment coefficient of the server, α represents a balanced load parameter of the server, and has a value range of 0.1-0.78, η represents a data transmission rate of the server, μ represents a data throughput rate of the server, ξ represents a steady-state parameter value of the server, ξ has a value range of 0.8-1, e represents a natural constant, P represents a working efficiency of the server, and C represents a CPU idle rate under the server;
secondly, the server dynamically updates the page list according to the balance load of the server and the response time determined according to the balance load, wherein the response time of the server is calculated according to the following formula:
in the above formula, T represents the response time of the server, Q represents the equilibrium load amount, β represents the load amount, diA distance value representing the ith data transmission, i ═ 1,2,3 … k;
and finally, dynamically updating the page list, comparing with the local scripting language, downloading the missing scripting language if the missing scripting language is missed, and dynamically loading the specified scripting language to realize dynamic refreshing and new adding effects, so that the access to the page can be realized by reading the local scripting language.
Further, the system comprises:
the acquisition module is used for acquiring all webpage codes and compiling the webpage codes into a script language;
the transmission module is used for uploading the formed script language to the server and configuring a page list corresponding to the script language;
the downloading module is used for opening a website by using a browser, accessing a webpage and downloading a script language to the local;
and the access module is used for directly reading from the local script language to realize the access to the webpage when the webpage is accessed again.
Further, the obtaining module comprises:
the image acquisition module is used for acquiring a parent image of the webpage image and extracting at least one sub-image of the webpage code to be generated from the parent image; taking the sub-image or optional one sub-image designated by a user as the webpage image to be processed;
the sample matching module is used for determining a webpage image sample matched with the webpage image from a preset webpage image sample library;
the webpage code acquisition module is used for acquiring the webpage codes corresponding to the determined webpage image sample until all the webpage codes in the father image are acquired;
and the compiling and forming module is used for compiling all the acquired webpage codes to form a script language.
Further, the transmission module includes:
the uploading module is used for uploading the formed script language to the server and reading the configuration information in the server configuration table;
and the configuration module is used for configuring the page list corresponding to the script language according to the configuration information in the service configuration table.
Further, the download module comprises:
the configuration management module is used for configuring the managed URL access resources and the URL access strategy on the server;
the execution judgment module is used for issuing an access strategy of the configured user URL to the user terminal by the server when the user accesses the network through the user terminal URL server, judging whether the user is allowed to carry out URL access according to the issued URL access strategy when the user accesses the subsequent URL, accessing a webpage and setting a downloading strategy for downloading the script language when the URL access is allowed, wherein the downloading strategy comprises the steps of adding a configuration file for downloading the script language under a root directory of an application program, downloading the script language according to the downloading strategy and saving the script language to the local.
Further, when the access module accesses the webpage again, the specific steps of directly reading the webpage from the local script language to access the webpage are as follows:
firstly, a socket connection is established between a user side and a server side, and the server side adjusts the balanced load capacity of the server according to an adjustment coefficient, wherein the adjustment coefficient is calculated according to the following formula:
in the above formula, λ represents an adjustment coefficient of the server, α represents a balanced load parameter of the server, and has a value range of 0.1-0.78, η represents a data transmission rate of the server, μ represents a data throughput rate of the server, ξ represents a steady-state parameter value of the server, ξ has a value range of 0.8-1, e represents a natural constant, P represents a working efficiency of the server, and C represents a CPU idle rate under the server;
secondly, the server dynamically updates the page list according to the balance load of the server and the response time determined according to the balance load, wherein the response time of the server is calculated according to the following formula:
in the above formula, T represents the response time of the server, Q represents the equilibrium load amount, β represents the load amount, diA distance value representing the ith data transmission, i ═ 1,2,3 … k;
and finally, dynamically updating the page list, comparing with the local scripting language, downloading the missing scripting language if the missing scripting language is missed, and dynamically loading the specified scripting language to realize dynamic refreshing and new adding effects, so that the access to the page can be realized by reading the local scripting language.
1. Compared with the prior art, the invention has the beneficial effects that: the invention provides a method and a system for dynamically adding or refreshing a webpage, wherein the method comprises the following steps: acquiring all webpage codes, and compiling the webpage codes to form a script language; uploading the formed script language to a server, and configuring a page list corresponding to the script language; a user opens a website by using a browser, accesses a webpage and downloads a script language to the local; when the webpage is accessed again, the webpage is directly accessed by reading from the local script language; the webpage is stored locally in a script language form, the loading efficiency is high next time, the loading speed is higher, problems occur on the webpage, the whole package is not needed to be modified, a certain module or a certain part of codes can be modified in a silent mode, the webpage is newly added with the webpage, the client can directly receive the webpage, the webpage is directly used on the premise that manual refreshing is not needed, and the webpage does not need to be refreshed manually and can be refreshed automatically.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings of the embodiments of the present invention will be briefly described below. Wherein the drawings are only for purposes of illustrating some embodiments of the invention and are not to be construed as limiting the invention to all embodiments thereof.
FIG. 1 is a flowchart of a method for dynamically adding or refreshing a web page according to the present invention;
FIG. 2 is a flow chart of a system for dynamically adding or refreshing a web page according to the present invention;
fig. 3 is a block diagram of a system for dynamically adding or refreshing a web page according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the 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.
As shown in fig. 1-3, the technical problem to be solved by the present invention is to provide a method for dynamically adding or refreshing a web page, the method comprising:
s1, acquiring all web page codes and compiling the web page codes to form a script language;
s2, uploading the formed script language to a server, and configuring a page list corresponding to the script language;
s3, the user opens the website by using the browser, accesses the webpage and downloads the script language to the local;
s4, when the web page is accessed again, the web page is accessed directly by reading from the local script language.
Firstly, acquiring all webpage codes, and compiling the webpage codes to form a script language; secondly, uploading the formed scripting language to a server, and configuring a page list corresponding to the scripting language, wherein the page list is a page list locally stored, and is subsequently used for page comparison between the server and the front end, such as: 1, link: 'http:// www.xxxx.com/xxxx', js: x.js }, the server side issues the same data, so that the same data can be searched in a local list, a local corresponding scripting language file is found, and if the local list is inconsistent with the server side, the server side downloads the latest scripting language file; then, a user opens a website by using a browser, accesses a webpage and downloads a script language to the local, wherein the script language is js; finally, when the webpage is accessed again, the webpage is accessed directly by reading the webpage from the local scripting language, so that the webpage is stored locally in the scripting language form, the next loading efficiency is improved, the loading speed is higher, the webpage has problems, the whole package of modification is not needed, a certain module or a certain part of codes can be modified silently, the webpage is newly added, the client can directly receive the webpage, the webpage is directly used on the premise that manual refreshing is not needed, and the webpage can be refreshed automatically without manual refreshing.
In an embodiment of the present invention, the acquiring all web page codes and compiling them into a script language includes:
acquiring a parent image of the webpage image, and extracting at least one sub-image of the webpage code to be generated from the parent image; taking the sub-image or optional one sub-image designated by a user as the webpage image to be processed;
determining a webpage image sample matched with the webpage image from a preset webpage image sample library;
determining a webpage code corresponding to one webpage image sample until all webpage codes in the father image are obtained;
and compiling all the acquired webpage codes to form a script language.
In the technical scheme, firstly, a parent image of the webpage image is obtained, and at least one subimage of the webpage code to be generated is extracted from the parent image; taking the sub-image or optional one sub-image designated by a user as the webpage image to be processed; secondly, determining a webpage image sample matched with the webpage image from a preset webpage image sample library; then, determining a webpage code corresponding to one webpage image sample until all webpage codes in the parent image are obtained; finally, all the acquired webpage codes are compiled to form a script language, so that the problem on the webpage is solved, a whole package of modification is not needed, a certain module or a certain part of codes can be modified in a silent mode, the efficiency is greatly improved, and the time is saved.
In an embodiment provided by the present invention, the uploading the formed scripting language to the server, and configuring a page list corresponding to the scripting language, includes:
uploading the formed script language to a server, and reading configuration information in a server configuration table;
and configuring a page list corresponding to the script language according to the configuration information in the service configuration table.
In the technical scheme, firstly, the formed script language is uploaded to a server, the configuration information in a server configuration table is read, and secondly, a page list corresponding to the script language is configured according to the configuration information in the service configuration table; therefore, the page list not only contains the server configuration information, but also contains the script language information, so that the page list is more representative, and the page list corresponding to the script language is formed, so that the webpage can be accessed directly by reading from the local script language when the webpage is accessed again in the later period, the loading efficiency is high, and the loading speed is higher.
In one embodiment of the present invention, the user opens a website by using a browser, accesses a web page, and downloads a script language to the local, including:
configuring a managed URL access resource and a URL access strategy on a server;
when a user accesses a network through a user terminal URL server, the server issues an access strategy of the configured user URL to the user terminal, and the subsequent URL access of the user judges whether the user is allowed to carry out URL access or not according to the issued URL access strategy;
and when URL access is allowed, accessing a webpage, and setting a downloading strategy for downloading the script language, wherein the downloading strategy comprises adding a configuration file for downloading the script language under a root directory of an application program, downloading the script language according to the downloading strategy, and storing the script language to the local.
In the technical scheme, firstly, a managed URL access resource and a URL access strategy are configured on a server; secondly, when a user accesses a network through a user terminal URL server, the server issues an access strategy of the configured user URL to the user terminal, the user accesses the URL later, whether the user is allowed to access the URL is judged according to the issued URL access strategy, when the user is allowed to access the URL, a webpage is accessed, a downloading strategy for downloading a script language is set, and the downloading strategy comprises the steps of adding a configuration file for downloading the script language under a root directory of an application program, downloading the script language according to the downloading strategy, and storing the script language to the local; the access strategy of the user URL is configured on the server in advance, then the access strategy of the user URL is issued to the user terminal, and the URL access behavior of the user is controlled through the issued URL user access strategy, so that the access strategy is simple to maintain and flexible and convenient to operate.
In an embodiment provided by the present invention, when the web page is accessed again, the accessing of the web page is directly realized by reading from the local scripting language, including:
firstly, a socket connection is established between a user side and a server side, and the server side adjusts the balanced load capacity of the server according to an adjustment coefficient, wherein the adjustment coefficient is calculated according to the following formula:
in the above formula, λ represents an adjustment coefficient of the server, α represents a balanced load parameter of the server, and has a value range of 0.1-0.78, η represents a data transmission rate of the server, μ represents a data throughput rate of the server, ξ represents a steady-state parameter value of the server, ξ has a value range of 0.8-1, e represents a natural constant, P represents a working efficiency of the server, and C represents a CPU idle rate under the server;
secondly, the server dynamically updates the page list according to the balance load of the server and the response time determined according to the balance load, wherein the response time of the server is calculated according to the following formula:
in the above formula, T represents the response time of the server, Q represents the equilibrium load amount, β represents the load amount, diA distance value representing the ith data transmission, i ═ 1,2,3 … k;
and finally, dynamically updating the page list, comparing with the local scripting language, downloading the missing scripting language if the missing scripting language is missed, and dynamically loading the specified scripting language to realize dynamic refreshing and new adding effects, so that the access to the page can be realized by reading the local scripting language.
In the technical scheme, a user end and a server end establish socket connection, the server end adjusts the balance load of the server according to an adjustment coefficient, wherein the socket is connected with the user end and the server end, once the server end finds the change of the list, the server end pushes a message to the user end, the user end pulls a latest list, compares a local script language, downloads a missing script language if the local script language is missing, and then dynamically loads a specified script language to achieve the effect of dynamic refreshing or adding a new page, wherein the page list is dynamically updated, the server adjusts the balance load of the server according to the adjustment coefficient, determines the response time according to the balance load to dynamically update the page list, so that the effect of adding a new page is achieved, the page does not need to be manually refreshed, the refreshing can be automatically performed, the algorithm considers the adjustment coefficient, the balance load parameter, the load capacity and other factors of the server, therefore, the calculation result is more accurate, and whether the server reaches the maximum load of the server can be judged by analyzing the load and the response time of the server, so that the system can better dynamically update the page list according to the response time of the server, the requirement of manually refreshing the page is met, the automatic refreshing is achieved, and the time is greatly saved.
A system for dynamically adding or refreshing a web page, the system comprising:
the acquisition module is used for acquiring all webpage codes and compiling the webpage codes into a script language;
the transmission module is used for uploading the formed script language to the server and configuring a page list corresponding to the script language;
the downloading module is used for opening a website by using a browser, accessing a webpage and downloading a script language to the local;
and the access module is used for directly reading from the local script language to realize the access to the webpage when the webpage is accessed again.
Firstly, an acquisition module acquires all webpage codes and compiles the webpage codes to form a script language; secondly, the transmission module uploads the formed scripting language to the server, and configures a page list corresponding to the scripting language, wherein the page list is a page list locally stored, and is subsequently used for page comparison between the server and the front end, such as: 1, link: 'http:// www.xxxx.com/xxxx', js: x.js }, the server side issues the same data, so that the same data can be searched in a local list, a local corresponding scripting language file is found, and if the local list is inconsistent with the server side, the server side downloads the latest scripting language file; then, the downloading module opens the website by using a browser, accesses the webpage and downloads the script language to the local; finally, when the access module accesses the webpage again, the access to the webpage is directly realized by reading from the local scripting language, so that the webpage is stored locally in the scripting language form, the next loading efficiency is improved, the loading speed is higher, the problem occurs on the webpage, the whole package of modification is not needed, a certain module or a certain part of codes can be modified silently, the webpage is newly added, the client can directly receive the webpage without manual refreshing, the webpage can be directly used, and the method does not need manual refreshing and can automatically refresh the webpage.
In one embodiment of the present invention, the obtaining module includes:
the image acquisition module is used for acquiring a parent image of the webpage image and extracting at least one sub-image of the webpage code to be generated from the parent image; taking the sub-image or optional one sub-image designated by a user as the webpage image to be processed;
the sample matching module is used for determining a webpage image sample matched with the webpage image from a preset webpage image sample library;
the webpage code acquisition module is used for acquiring the webpage codes corresponding to the determined webpage image sample until all the webpage codes in the father image are acquired;
and the compiling and forming module is used for compiling all the acquired webpage codes to form a script language.
In the technical scheme, firstly, an image acquisition module acquires a parent image of the webpage image and extracts at least one sub-image of a webpage code to be generated from the parent image; taking the sub-image or optional one sub-image designated by a user as the webpage image to be processed; secondly, determining a webpage image sample matched with the webpage image from a preset webpage image sample library by a sample matching module; then, the webpage code acquisition module acquires the webpage codes corresponding to the determined webpage image sample until all the webpage codes in the father image are acquired; finally, the compiling and forming module compiles all the acquired webpage codes to form a script language, so that problems occur on the webpage, the whole package of modification is not needed, a certain module or a certain part of codes can be modified in a silent mode, the efficiency is greatly improved, and the time is saved.
In one embodiment of the present invention, the transmission module includes:
the uploading module is used for uploading the formed script language to the server and reading the configuration information in the server configuration table;
and the configuration module is used for configuring the page list corresponding to the script language according to the configuration information in the service configuration table.
In the technical scheme, firstly, the uploading module uploads the formed script language to the server and reads the configuration information in the server configuration table, and secondly, the configuration module configures the page list corresponding to the script language according to the configuration information in the service configuration table; therefore, the page list not only contains the server configuration information, but also contains the script language information, so that the page list is more representative, and the page list corresponding to the script language is formed, so that the webpage can be accessed directly by reading from the local script language when the webpage is accessed again in the later period, the loading efficiency is high, and the loading speed is higher.
In an embodiment provided by the present invention, the download module includes:
the configuration management module is used for configuring the managed URL access resources and the URL access strategy on the server;
the execution judgment module is used for issuing an access strategy of the configured user URL to the user terminal by the server when the user accesses the network through the user terminal URL server, judging whether the user is allowed to carry out URL access according to the issued URL access strategy when the user accesses the URL later, accessing a webpage and setting a downloading strategy for downloading the script language when the URL access is allowed, wherein the downloading strategy comprises the steps of adding a configuration file for downloading the script language under a root directory of an application program, downloading the script language according to the downloading strategy and saving the script language to the local.
In the technical scheme, firstly, a configuration management module configures the managed URL access resource and URL access strategy on a server; secondly, when the execution judging module accesses the network through a user terminal URL server, the server issues an access strategy of the configured user URL to the user terminal, the user accesses the URL later, judges whether the user is allowed to access the URL according to the issued URL access strategy, when the URL access is allowed, the user accesses a webpage and sets a downloading strategy for downloading the script language, wherein the downloading strategy comprises adding a configuration file for downloading the script language under a root directory of an application program, downloading the script language according to the downloading strategy and storing the script language to the local; the access strategy of the user URL is configured on the server in advance, then the access strategy of the user URL is issued to the user terminal, and the URL access behavior of the user is controlled through the issued URL user access strategy, so that the access strategy is simple to maintain and flexible and convenient to operate
In an embodiment provided by the present invention, when the access module performs the next web page access, the specific steps of directly reading from the local scripting language to access the web page are as follows:
firstly, a socket connection is established between a user side and a server side, and the server side adjusts the balanced load capacity of the server according to an adjustment coefficient, wherein the adjustment coefficient is calculated according to the following formula:
in the above formula, λ represents an adjustment coefficient of the server, α represents a balanced load parameter of the server, and has a value range of 0.1-0.78, η represents a data transmission rate of the server, μ represents a data throughput rate of the server, ξ represents a steady-state parameter value of the server, ξ has a value range of 0.8-1, e represents a natural constant, P represents a working efficiency of the server, and C represents a CPU idle rate under the server;
secondly, the server dynamically updates the page list according to the balance load of the server and the response time determined according to the balance load, wherein the response time of the server is calculated according to the following formula:
in the above formula, T represents the response time of the server, Q represents the equilibrium load amount, β represents the load amount, diA distance value representing the ith data transmission, i ═ 1,2,3 … k;
and finally, dynamically updating the page list, comparing with the local scripting language, downloading the missing scripting language if the missing scripting language is missed, and dynamically loading the specified scripting language to realize dynamic refreshing and new adding effects, so that the access to the page can be realized by reading the local scripting language.
In the technical scheme, a user end and a server end establish socket connection, the server end adjusts the balance load of the server according to an adjustment coefficient, wherein the socket is connected with the user end and the server end, once the server end finds the change of the list, the server end pushes a message to the user end, the user end pulls a latest list, compares a local script language, downloads a missing script language if the local script language is missing, and then dynamically loads a specified script language to achieve the effect of dynamic refreshing or adding a new page, wherein the page list is dynamically updated, the server adjusts the balance load of the server according to the adjustment coefficient, determines the response time according to the balance load to dynamically update the page list, so that the effect of adding a new page is achieved, the page does not need to be manually refreshed, the refreshing can be automatically performed, the algorithm considers the adjustment coefficient, the balance load parameter, the load capacity and other factors of the server, therefore, the calculation result is more accurate, and whether the server reaches the maximum load of the server can be judged by analyzing the load and the response time of the server, so that the system can better dynamically update the page list according to the response time of the server, the requirement of manually refreshing the page is met, the automatic refreshing is achieved, and the time is greatly saved.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle scope of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A method for dynamically adding or refreshing a webpage is characterized by comprising the following steps:
acquiring all webpage codes, and compiling the webpage codes to form a script language;
uploading the formed script language to a server, and configuring a page list corresponding to the script language;
a user opens a website by using a browser, accesses a webpage and downloads a script language to the local;
when the webpage is accessed again, the webpage is directly accessed by reading from the local script language.
2. The method for dynamically adding or refreshing web pages according to claim 1, wherein the acquiring all web page codes and compiling the web page codes into a script language comprises:
acquiring a parent image of the webpage image, and extracting at least one sub-image of the webpage code to be generated from the parent image; taking the sub-image or optional one sub-image designated by a user as the webpage image to be processed;
determining a webpage image sample matched with the webpage image from a preset webpage image sample library;
determining a webpage code corresponding to one webpage image sample until all webpage codes in the father image are obtained;
and compiling all the acquired webpage codes to form a script language.
3. The method for dynamically adding or refreshing a web page according to claim 1, wherein the uploading the formed scripting language to the server and configuring the page list corresponding to the scripting language comprises:
uploading the formed script language to a server, and reading configuration information in a server configuration table;
and configuring a page list corresponding to the script language according to the configuration information in the service configuration table.
4. The method as claimed in claim 1, wherein the user opens the web site by using a browser, accesses the web page, and downloads the scripting language to the local, including:
configuring a managed URL access resource and a URL access strategy on a server;
when a user accesses a network through a user terminal URL server, the server issues an access strategy of the configured user URL to the user terminal, and the subsequent URL access of the user judges whether the user is allowed to carry out URL access or not according to the issued URL access strategy;
and when URL access is allowed, accessing a webpage, and setting a downloading strategy for downloading the script language, wherein the downloading strategy comprises adding a configuration file for downloading the script language under a root directory of an application program, downloading the script language according to the downloading strategy, and storing the script language to the local.
5. The method for dynamically adding or refreshing a web page according to claim 1, wherein when the web page is accessed again, the web page is accessed directly by reading from a local scripting language, and the method comprises the following steps:
firstly, a socket connection is established between a user side and a server side, and the server side adjusts the balanced load capacity of the server according to an adjustment coefficient, wherein the adjustment coefficient is calculated according to the following formula:
in the above formula, λ represents an adjustment coefficient of the server, α represents a balanced load parameter of the server, and has a value range of 0.1-0.78, η represents a data transmission rate of the server, μ represents a data throughput rate of the server, ξ represents a steady-state parameter value of the server, ξ has a value range of 0.8-1, e represents a natural constant, P represents a working efficiency of the server, and C represents a CPU idle rate under the server;
secondly, the server dynamically updates the page list according to the balance load of the server and the response time determined according to the balance load, wherein the response time of the server is calculated according to the following formula:
in the above formula, T represents the response time of the server, Q represents the equilibrium load amount, β represents the load amount, diA distance value representing the ith data transmission, i ═ 1,2,3 … k;
and finally, dynamically updating the page list, comparing with the local scripting language, downloading the missing scripting language if the missing scripting language is missed, and dynamically loading the specified scripting language to realize dynamic refreshing and new adding effects, so that the access to the page can be realized by reading the local scripting language.
6. A system for dynamically adding or refreshing webpages according to claim 1, wherein the system comprises:
the acquisition module is used for acquiring all webpage codes and compiling the webpage codes into a script language;
the transmission module is used for uploading the formed script language to the server and configuring a page list corresponding to the script language;
the downloading module is used for opening a website by using a browser, accessing a webpage and downloading a script language to the local;
and the access module is used for directly reading from the local script language to realize the access to the webpage when the webpage is accessed again.
7. The system for dynamically adding or refreshing webpages according to claim 6, wherein the acquiring module comprises:
the image acquisition module is used for acquiring a parent image of the webpage image and extracting at least one sub-image of the webpage code to be generated from the parent image; taking the sub-image or optional one sub-image designated by a user as the webpage image to be processed;
the sample matching module is used for determining a webpage image sample matched with the webpage image from a preset webpage image sample library;
the webpage code acquisition module is used for acquiring the webpage codes corresponding to the determined webpage image sample until all the webpage codes in the father image are acquired;
and the compiling and forming module is used for compiling all the acquired webpage codes to form a script language.
8. The system for dynamically adding or refreshing webpages according to claim 6, wherein the transmission module comprises:
the uploading module is used for uploading the formed script language to the server and reading the configuration information in the server configuration table;
and the configuration module is used for configuring the page list corresponding to the script language according to the configuration information in the service configuration table.
9. The system for dynamically adding or refreshing webpages according to claim 6, wherein the downloading module comprises:
the configuration management module is used for configuring the managed URL access resources and the URL access strategy on the server;
the execution judgment module is used for issuing an access strategy of the configured user URL to the user terminal by the server when the user accesses the network through the user terminal URL server, judging whether the user is allowed to carry out URL access according to the issued URL access strategy when the user accesses the URL later, accessing a webpage and setting a downloading strategy for downloading the script language when the URL access is allowed, wherein the downloading strategy comprises the steps of adding a configuration file for downloading the script language under a root directory of an application program, downloading the script language according to the downloading strategy and saving the script language to the local.
10. The system for dynamically adding or refreshing a web page according to claim 6, wherein the specific steps of the access module directly reading from the local scripting language to access the web page when performing the next web page access are as follows:
firstly, a socket connection is established between a user side and a server side, and the server side adjusts the balanced load capacity of the server according to an adjustment coefficient, wherein the adjustment coefficient is calculated according to the following formula:
in the above formula, λ represents an adjustment coefficient of the server, α represents a balanced load parameter of the server, and has a value range of 0.1-0.78, η represents a data transmission rate of the server, μ represents a data throughput rate of the server, ξ represents a steady-state parameter value of the server, ξ has a value range of 0.8-1, e represents a natural constant, P represents a working efficiency of the server, and C represents a CPU idle rate under the server;
secondly, the server dynamically updates the page list according to the balance load of the server and the response time determined according to the balance load, wherein the response time of the server is calculated according to the following formula:
in the above formula, T represents the response time of the server, Q represents the equilibrium load amount, β represents the load amount, diA distance value representing the ith data transmission, i ═ 1,2,3 … k;
and finally, dynamically updating the page list, comparing with the local scripting language, downloading the missing scripting language if the missing scripting language is missed, and dynamically loading the specified scripting language to realize dynamic refreshing and new adding effects, so that the access to the page can be realized by reading the local scripting language.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110081892.2A CN112764759B (en) | 2021-01-21 | 2021-01-21 | Method and system for dynamically adding or refreshing web pages |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110081892.2A CN112764759B (en) | 2021-01-21 | 2021-01-21 | Method and system for dynamically adding or refreshing web pages |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112764759A true CN112764759A (en) | 2021-05-07 |
CN112764759B CN112764759B (en) | 2023-10-27 |
Family
ID=75702264
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110081892.2A Active CN112764759B (en) | 2021-01-21 | 2021-01-21 | Method and system for dynamically adding or refreshing web pages |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112764759B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040225633A1 (en) * | 2003-05-08 | 2004-11-11 | Taiwan Semiconductor Manufacturing Co. | Using pure HTML to access database without refreshing page |
CN103544209A (en) * | 2013-08-26 | 2014-01-29 | 深圳市融创天下科技股份有限公司 | Method and system for web page access |
CN108228282A (en) * | 2018-04-04 | 2018-06-29 | 北京三快在线科技有限公司 | For the method and device of Website page loading |
-
2021
- 2021-01-21 CN CN202110081892.2A patent/CN112764759B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040225633A1 (en) * | 2003-05-08 | 2004-11-11 | Taiwan Semiconductor Manufacturing Co. | Using pure HTML to access database without refreshing page |
CN103544209A (en) * | 2013-08-26 | 2014-01-29 | 深圳市融创天下科技股份有限公司 | Method and system for web page access |
CN108228282A (en) * | 2018-04-04 | 2018-06-29 | 北京三快在线科技有限公司 | For the method and device of Website page loading |
Also Published As
Publication number | Publication date |
---|---|
CN112764759B (en) | 2023-10-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7320011B2 (en) | Selecting data for synchronization and for software configuration | |
JP4437918B2 (en) | Apparatus and method for selectively retrieving information and subsequently displaying the information | |
CN101127038B (en) | System and method for downloading website static web page | |
US7032011B2 (en) | Server based extraction, transfer, storage and processing of remote settings, files and data | |
CN101512483B (en) | Dynamically generating customized user interfaces | |
US20060020883A1 (en) | Web page personalization | |
US20200404046A1 (en) | Application Download Method and Apparatus, Application Sending Method and Apparatus, and System | |
CN111444455B (en) | Browser compatible method, system, computer device and storage medium | |
US20090240698A1 (en) | Computing environment platform | |
CN106294379A (en) | The loading method of a kind of page, device and system | |
US20080168345A1 (en) | Automatically collecting and compressing style attributes within a web document | |
JP2004510254A (en) | Network server | |
CN102821133B (en) | The method of XBRL Data Analysis and server | |
CN110032388A (en) | A kind of building of delta file, publication, method for down loading and device | |
CN104657118A (en) | Native + Web mixed mobile application achieving method and device | |
CN108132950A (en) | Information displaying method, information providing method, apparatus and system | |
CN104937581A (en) | Providing access to information across multiple computing devices | |
WO2003009102A2 (en) | Browser having dynamically self-adjusting rendering functionality | |
CN109284488B (en) | Method, device and medium for modifying front-end table column data based on local storage | |
CN101876998B (en) | Method and system for editing data | |
CN101115064A (en) | Network data storing, obtaining method and its implementing device | |
CN112764759A (en) | Method and system for dynamically adding or refreshing webpage | |
CN111159596A (en) | Application resource access control method and device | |
CN115225719B (en) | Distributed directional network data acquisition and analysis method | |
CN113360156A (en) | IOS compiling method and related equipment |
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 |