CN117708450A - Webpage display method, device, equipment, medium and product - Google Patents

Webpage display method, device, equipment, medium and product Download PDF

Info

Publication number
CN117708450A
CN117708450A CN202311615128.4A CN202311615128A CN117708450A CN 117708450 A CN117708450 A CN 117708450A CN 202311615128 A CN202311615128 A CN 202311615128A CN 117708450 A CN117708450 A CN 117708450A
Authority
CN
China
Prior art keywords
target
webpage
data
identification information
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311615128.4A
Other languages
Chinese (zh)
Inventor
周丽雯
张一飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Glenfly Tech Co Ltd
Original Assignee
Glenfly Tech 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 Glenfly Tech Co Ltd filed Critical Glenfly Tech Co Ltd
Priority to CN202311615128.4A priority Critical patent/CN117708450A/en
Publication of CN117708450A publication Critical patent/CN117708450A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The application relates to a webpage display method, a webpage display device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: after receiving the webpage access request sent by the browser, the server obtains a first cascade data query statement, an initial webpage frame file and an identification information verification instruction through the called interpreter and the uniform resource identifier. The initial webpage frame file comprises a dynamic module and a static module, and corresponding first target data are inserted into the static module, so that data required by the static module are not required to be acquired any more, only second target data required by the dynamic module are required to be acquired, the load of a server can be effectively reduced, and the webpage loading speed is improved; in addition, various related data can be obtained from the database at one time by utilizing the first cascade data query statement, the data do not need to be obtained from the database for many times, and the obtaining efficiency of target data can be improved, so that the webpage loading speed is improved.

Description

Webpage display method, device, equipment, medium and product
Technical Field
The present invention relates to the field of web page application technologies, and in particular, to a web page display method, a web page display device, a computer device, a storage medium, and a computer program product.
Background
PHP (Hypertext Preprocessor ) is an open source dynamic web technology widely used at present, and has the characteristics of high interactivity, high flexibility, easy maintenance and the like. However, when the user accesses the PHP webpage, the user needs to send a request to the Apache server end through the browser, the webpage is loaded after the response of the server, the whole process needs to be transformed by multiple steps, and if the access amount is too large and the access times are too frequent, the burden of the server is increased, so that the webpage loading is slow.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a web page display method, apparatus, computer device, computer-readable storage medium, and computer program product that can increase the web page loading speed.
In a first aspect, the present application provides a web page display method, where the method includes:
acquiring a webpage access request sent by a browser, wherein the webpage access request comprises a uniform resource locator and identification information of a user initiating the webpage access request;
based on the uniform resource identifier and the interpretation program, a first cascade data query statement, an initial webpage frame file and an identification information verification instruction are obtained, wherein the initial webpage frame file comprises a plurality of modules, each module comprises at least one data insertion position, the modules are divided into a static module and a dynamic module, first target data are inserted into each data insertion position in the static module, the first target data are updated according to a preset updating rule, and a placeholder is inserted into each data insertion position in the dynamic module;
Acquiring second target data from a database based on the identification information, the identification information verification instruction and the first cascade data query statement;
replacing corresponding placeholders in the initial webpage frame file by the second target data to obtain a target webpage frame file;
and sending the target webpage frame file to the browser so that the browser displays the corresponding target webpage.
In one embodiment, the obtaining, based on the uniform resource identifier and the interpretation program, a first cascaded data query statement, an initial web page frame file, and an identification information verification instruction includes:
acquiring a corresponding first script file based on the uniform resource locator;
and analyzing the script program in the first script file by using the interpreter program to obtain a first cascade data query statement, an initial webpage frame file and an identification information verification instruction.
In one embodiment, the obtaining, based on the uniform resource locator, a corresponding first script file includes:
acquiring a URL path from the uniform resource locator;
and acquiring a corresponding first script file based on the URL path and a preset routing rule.
In one embodiment, the obtaining the second target data from the database based on the identification information, the identification information verification instruction, and the first cascaded data query statement includes:
judging whether an identification information set in the database comprises the identification information or not based on the identification information verification instruction;
and if so, acquiring the second target statement from the database based on the first cascade data query statement.
In one embodiment, the preset updating rule is to update according to a preset period; the updating process of the first target data comprises the following steps:
acquiring a second script file based on the preset period;
analyzing the script program in the second script file by using the interpreter program to obtain a second cascade data query statement and a current webpage frame file;
acquiring third target data from the database based on the second cascade data query statement;
and replacing the corresponding first target data in the current webpage frame file by the third target data.
In one embodiment, the sending the target web page frame file to the browser, so that the browser displays the corresponding target web page, includes:
Generating a target response file based on the target webpage frame file, wherein the target response file comprises a state code, response header information and the target webpage frame file;
and sending the target response file to the browser, so that the browser analyzes the target webpage frame file based on the response header information under the condition that the state code is a preset state code, and obtains and displays a target webpage.
In a second aspect, the present application further provides a web page display device, including:
the first acquisition module is used for acquiring a webpage access request sent by a browser, wherein the webpage access request comprises a uniform resource locator and identification information of a user initiating the webpage access request;
the second acquisition module is used for acquiring a first cascade data query statement, an initial webpage frame file and an identification information verification instruction based on the uniform resource identifier and the interpretation program, wherein the initial webpage frame file comprises a plurality of modules, each module comprises at least one data insertion position, the plurality of modules are divided into a static module and a dynamic module, each data insertion position in the static module is inserted with first target data, the first target data is updated according to a preset updating rule, and each data insertion position in the dynamic module is inserted with a placeholder;
The third acquisition module is used for acquiring second target data from a database based on the identification information, the identification information verification instruction and the first cascade data query statement;
a fourth obtaining module, configured to replace a corresponding placeholder in the initial web page frame file with the second target data to obtain a target web page frame file;
and the display module is used for sending the target webpage frame file to the browser so as to enable the browser to display the corresponding target webpage.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the method of any of the embodiments described above when the computer program is executed by the processor.
In a fourth aspect, the present application also provides a computer-readable storage medium. A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method of any of the embodiments described above.
In a fifth aspect, the present application also provides a computer program product. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of any of the embodiments described above.
According to the webpage display method, the webpage display device, the computer equipment, the storage medium and the computer program product, after receiving the webpage access request sent by the browser, the server obtains a first cascade data query statement, an initial webpage frame file and an identification information verification instruction through the called interpreter and the uniform resource identifier contained in the webpage access request. The initial webpage frame file comprises a dynamic module and a static module, and corresponding first target data are inserted into the static module, so that data required by the static module are not required to be acquired any more, only second target data required by the dynamic module are required to be acquired, the load of a server can be effectively reduced, and the webpage loading speed is improved; in addition, various related data can be obtained from the database at one time by utilizing the first cascade data query statement, the data do not need to be obtained from the database for many times, and the obtaining efficiency of target data can be improved, so that the webpage loading speed is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for a person having ordinary skill in the art.
FIG. 1 is an application environment diagram of a web page display method in one embodiment;
FIG. 2 is a flowchart of a method for displaying a web page according to an embodiment;
FIG. 3 is a flow chart of a script program parsing method in one embodiment;
FIG. 4 is a block diagram of a web page display device according to an embodiment;
fig. 5 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The webpage display method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Fig. 1 includes a terminal 102 and a server 104, wherein the terminal 102 communicates with the server 104 over a network. The terminal 102 is provided with a browser, which is a software application for accessing and browsing web pages on the internet, allowing a user to input web addresses or search keywords and display web page contents, and can be run on various computers and mobile devices, such as personal computers, mobile phones, tablet computers, etc. Server 104 may be a WEB server, which is a software or computer system that provides WEB pages and other WEB resources over a computer network. Specifically, the terminal 102 sends a page access request to the server 104, and the server 104 obtains a target web frame file based on the page access request and sends the target web frame file to the terminal 102.
In an exemplary embodiment, as shown in fig. 2, a web page display method is provided, and the method is applied to the server in fig. 1 for illustration, and includes the following steps:
s202, acquiring a webpage access request sent by a browser, wherein the webpage access request comprises a uniform resource locator and identification information of a user initiating the webpage access request.
The page access request is determined based on a website or a keyword input by a user in the browser, for example, the keyword input by the user in the browser is test data obtained by testing a certain item, and then the browser generates a page access request corresponding to the test data; a uniform resource locator (Uniform Resource Locator, URL) is a string used to identify and locate resources on the internet, specifying the location and access manner of the resources; the identification information may be identity information of the user.
S204, based on the uniform resource identifier and the interpretation program, obtaining a first cascade data query statement, an initial webpage frame file and an identification information verification instruction, wherein the initial webpage frame file comprises a plurality of modules, each module comprises at least one data insertion position, the plurality of modules are divided into a static module and a dynamic module, first target data are inserted into each data insertion position in the static module, the first target data are updated according to a preset updating rule, and a placeholder is inserted into each data insertion position in the dynamic module.
The interpreter has an analysis function and can interpret codes into instructions executable by a computer; the cascade data query statement is an SQL statement, and is used for acquiring multiple associated data from a database at the same time, for example, test data of a certain item needs to be acquired from the database, the test data comprise all test groups included in the item, the round number of the last test round, the number of test cases of different test results obtained by each group in the last test round, finally, the sum of the number of test cases corresponding to each test result in the last test round is calculated according to the acquired data, wherein the types of the test results comprise test success, test failure and test breakdown, one cascade data query statement can be set for the test data in a script file of a server, so that all test data can be acquired from the database at one time, and corresponding calculation is performed according to the acquired test data; the identification information verification instruction is used for verifying the identity information of the user.
The method comprises the steps that an initial webpage frame file is an HTML file which is stored in a script file of a server in advance, data insertion positions corresponding to all test data are arranged in the initial webpage frame file, and after the corresponding test data are inserted in all the data insertion positions, the server sends the initial webpage frame file to a browser so that the browser can display corresponding webpages; the corresponding first target data of the static module cannot be changed in real time and does not need to interact with a user, so that the first target data stored in the database cannot be changed in a certain period of time, the first target data can be stored in the corresponding data insertion position in the static module in advance, then the first target data in the static module is updated based on a preset updating rule, and therefore the first target data does not need to be acquired from the database every time the user initiates a page access request, for example, the test item name can be updated after the user initiated test item name changing request is received because the test item name generally cannot be changed in the test process; the second target data corresponding to the dynamic module changes in real time or needs to interact with the user, so that the second target data acquired from the database is different each time, and thus, when the second target data is acquired each time, the second target data needs to be acquired from the database in real time, and then the acquired data is used for replacing the corresponding placeholder, for example, in a certain test item, because the generated bug information changes in real time, when the user initiates a page access request, the real-time bug information needs to be acquired from the database each time.
S206, acquiring second target data from the database based on the identification information, the identification information verification instruction and the first cascade data query statement.
The server firstly verifies the identification information of the user based on the identification information verification instruction so as to determine whether the user has the authority to acquire data from the database, and then acquires a plurality of second target data which are mutually related from the database by utilizing a first cascade data query statement under the condition that verification is passed.
S208, replacing the corresponding placeholders in the initial webpage frame file by using the second target data to obtain the target webpage frame file.
Wherein a placeholder is a special symbol representing a location where a value needs to be specified in the future.
S210, sending the target webpage frame file to a browser so that the browser displays a corresponding target webpage.
The server generates a response file based on the target webpage frame file, sends the response file to the browser, and obtains a corresponding target webpage after the browser analyzes the response file.
In the above method for displaying a web page, after receiving a web page access request sent by a browser, a server obtains a first cascade data query statement, an initial web page frame file and an identification information verification instruction through a called interpreter and a uniform resource identifier included in the web page access request. The initial webpage frame file comprises a dynamic module and a static module, and corresponding first target data are inserted into the static module, so that data required by the static module are not required to be acquired any more, only second target data required by the dynamic module are required to be acquired, the load of a server can be effectively reduced, and the webpage loading speed is improved; in addition, various related data can be obtained from the database at one time by utilizing the first cascade data query statement, the data do not need to be obtained from the database for many times, and the obtaining efficiency of target data can be improved, so that the webpage loading speed is improved.
In some embodiments, as shown in fig. 3, based on the uniform resource identifier and the interpretation program, obtaining the first cascaded data query sentence, the initial web page frame file, and the identification information verification instruction includes:
s302, acquiring a corresponding first script file based on the uniform resource locator.
S304, analyzing the script program in the first script file by using the interpreter program to obtain a first cascade data query statement, an initial webpage frame file and an identification information verification instruction.
Specifically, the server finds a corresponding first script file based on the uniform resource identifier, and then invokes an interpreter to analyze the script file to obtain a first cascade data query statement, an initial webpage frame file and an identification information verification instruction.
In this embodiment, the first script file is parsed into the content executable by the server by using the interpreter, so that the corresponding target data can be obtained from the database, thereby generating the complete web frame file.
In some embodiments, based on the uniform resource locator, obtaining the corresponding first script file includes: acquiring a URL path from the uniform resource locator; based on the URL path and a preset routing rule, a corresponding first script file is obtained.
The preset routing rule characterizes a mapping relation between the URL path and the first script file.
Specifically, the server determines a preset routing rule matched with the URL path, and then obtains a corresponding first script file based on the preset routing rule.
In this embodiment, based on the URL path and the preset routing rule, the corresponding first script file can be accurately obtained from the server.
In some embodiments, retrieving the second target data from the database based on the identification information, the identification information verification instruction, and the first cascaded data query statement includes: judging whether the identification information set in the database comprises identification information or not based on the identification information verification instruction; if so, a second target statement is obtained from the database based on the first cascade data query statement.
The identification information set contains identification information of all users with authority to access the database.
In this embodiment, the identity of the user is verified through the identification information of the user and the identification information verification instruction, so that the security of the data stored in the database can be ensured, and the data leakage can be prevented.
In some embodiments, the preset updating rule is to update according to a preset period; the updating process of the first target data comprises the following steps: acquiring a second script file based on a preset period; analyzing script programs in the second script file by using an interpreter to obtain a second cascade data query statement and a current webpage frame file; acquiring third target data from the database based on the second cascade data query statement; and replacing corresponding first target data in the current webpage frame file by using the third target data.
For the part of first target data, a preset period can be set based on the update condition in the database, and the corresponding first target data in the web page frame file is updated, for example, the number of test cases can be changed at the starting time point of each test process, and the number of test cases can not be changed between the starting time points of the two previous and subsequent test processes, so that the time length between the starting time points of the two previous and subsequent test processes can be used as the preset period of the number of test cases in the web page frame file, and the starting time point of each test process can be used as the update time point of the number of test cases in the web page frame file.
In this embodiment, the first target data in the web frame file is updated based on the preset period, so that the first target data in the web frame file can be more accurate.
In some embodiments, sending the target web page frame file to the browser to cause the browser to display the corresponding target web page includes: generating a target response file based on the target webpage frame file, wherein the target response file comprises a status code, response header information and the target webpage frame file; and sending the target response file to the browser, so that the browser analyzes the target webpage frame file based on the response header information under the condition that the state code is the preset state code, and obtains and displays the target webpage.
The state code is a three-digit number, and is returned to the browser by the server and used for representing the processing result of the request and the state of the server; the response header information is metadata sent by the server in the HTTP response for providing additional information about the response, and is composed of a series of key-value pairs, each key-value pair representing a piece of header information.
In this embodiment, the web page displayed on the browser is determined based on the status code and the response header information, so that the web page displayed on the browser is more accurate.
In another embodiment, another web page display method is provided, the method comprising the following:
the server acquires a test data acquisition request sent by a browser, wherein the test data comprises a test item name, a total number of test cases, a successful number of test cases, a failed number of test cases, a crashed number of test cases, a number of bug generated in a test process and bug information of each bug.
The server obtains a target webpage frame file based on the test data acquisition request, and the target webpage frame file is provided with a data insertion position corresponding to each type of test data. Since the test item name, the total number of test cases, the number of successful test cases, the number of failed test cases and the number of crashed test cases do not change in real time, the test data can be inserted into the corresponding data insertion positions in advance, and only the data can be updated periodically. Because the bug quantity and bug information can change in real time, the server needs to acquire the corresponding bug quantity and bug information from the database based on cascade inquiry when receiving the test data acquisition request each time, and inserts the acquired bug quantity and bug information into the corresponding position in the target webpage frame file. After all the test data are inserted into the target webpage frame file, the server sends the target webpage frame file to the browser, so that the browser displays the corresponding webpage.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a webpage display device for realizing the webpage display method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the web page display device provided below may refer to the limitation of the web page display method hereinabove, and will not be repeated herein.
In one exemplary embodiment, as shown in fig. 4, there is provided a web page display device 400 including: a first acquisition module 401, a second acquisition module 402, a third acquisition module 403, a fourth acquisition module 404, and a display module 405, wherein:
the first obtaining module 401 is configured to obtain a web page access request sent by a browser, where the web page access request includes a uniform resource locator and identification information of a user who initiates the web page access request.
The second obtaining module 402 is configured to obtain, based on the uniform resource identifier and the interpretation program, a first cascade data query statement, an initial web page frame file, and an identification information verification instruction, where the initial web page frame file includes a plurality of modules, each module includes at least one data insertion location, the plurality of modules is divided into a static module and a dynamic module, each data insertion location in the static module is inserted with first target data, the first target data is updated according to a preset update rule, and each data insertion location in the dynamic module is inserted with a placeholder.
A third obtaining module 403, configured to obtain second target data from a database based on the identification information, the identification information verification instruction, and the first cascaded data query sentence.
And a fourth obtaining module 404, configured to replace a corresponding placeholder in the initial web page frame file with the second target data, so as to obtain a target web page frame file.
And the display module 405 is configured to send the target web page frame file to the browser, so that the browser displays a corresponding target web page.
In some embodiments, the second acquisition module 402 includes:
and the acquisition unit is used for acquiring the corresponding first script file based on the uniform resource locator.
And the analysis unit is used for analyzing the script program in the first script file by utilizing the interpretation program to obtain a first cascade data query statement, an initial webpage frame file and an identification information verification instruction.
In some embodiments, the obtaining unit is further configured to obtain a URL path from the uniform resource locator; and acquiring a corresponding first script file based on the URL path and a preset routing rule.
In some embodiments, the third obtaining module 403 is further configured to determine, based on the identification information verification instruction, whether the set of identification information in the database includes the identification information; and if so, acquiring the second target statement from the database based on the first cascade data query statement.
In some embodiments, the preset updating rule is to update according to a preset period; the web page display device 400 is specifically configured to obtain a second script file based on the preset period; analyzing the script program in the second script file by using the interpreter program to obtain a second cascade data query statement and a current webpage frame file; acquiring third target data from the database based on the second cascade data query statement; and replacing the corresponding first target data in the current webpage frame file by the third target data.
In some embodiments, the display module 405 is further configured to generate a target response file based on the target web page frame file, where the target response file includes a status code, response header information, and the target web page frame file; and sending the target response file to the browser, so that the browser analyzes the target webpage frame file based on the response header information under the condition that the state code is a preset state code, and obtains and displays a target webpage.
The above-described respective modules in the web page display device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one exemplary embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing page data. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a web page display method.
It will be appreciated by those skilled in the art that the structure shown in fig. 5 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one exemplary embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of: acquiring a webpage access request sent by a browser, wherein the webpage access request comprises a uniform resource locator and identification information of a user initiating the webpage access request; based on the uniform resource identifier and the interpretation program, a first cascade data query statement, an initial webpage frame file and an identification information verification instruction are obtained, wherein the initial webpage frame file comprises a plurality of modules, each module comprises at least one data insertion position, the modules are divided into a static module and a dynamic module, first target data are inserted into each data insertion position in the static module, the first target data are updated according to a preset updating rule, and a placeholder is inserted into each data insertion position in the dynamic module; acquiring second target data from a database based on the identification information, the identification information verification instruction and the first cascade data query statement; replacing corresponding placeholders in the initial webpage frame file by the second target data to obtain a target webpage frame file; and sending the target webpage frame file to the browser so that the browser displays the corresponding target webpage.
In one embodiment, the obtaining, by the processor, a first cascade data query statement, an initial web page frame file, and an identification information verification instruction based on the uniform resource identifier and the interpretation program, where the first cascade data query statement, the initial web page frame file, and the identification information verification instruction are implemented when the processor executes the computer program, includes: acquiring a corresponding first script file based on the uniform resource locator; and analyzing the script program in the first script file by using the interpreter program to obtain a first cascade data query statement, an initial webpage frame file and an identification information verification instruction.
In one embodiment, the obtaining, by the processor, a corresponding first script file based on the uniform resource locator when the processor executes the computer program includes: acquiring a URL path from the uniform resource locator; and acquiring a corresponding first script file based on the URL path and a preset routing rule.
In one embodiment, the processor, when executing the computer program, obtains the second target data from the database based on the identification information, the identification information verification instruction and the first cascade data query statement, including: judging whether an identification information set in the database comprises the identification information or not based on the identification information verification instruction; and if so, acquiring the second target statement from the database based on the first cascade data query statement.
In one embodiment, the predetermined update rule implemented when the processor executes the computer program is to update according to a predetermined period; the updating process of the first target data comprises the following steps: acquiring a second script file based on the preset period; analyzing the script program in the second script file by using the interpreter program to obtain a second cascade data query statement and a current webpage frame file; acquiring third target data from the database based on the second cascade data query statement; and replacing the corresponding first target data in the current webpage frame file by the third target data.
In one embodiment, the sending the target web page frame file to the browser, implemented when the processor executes the computer program, causes the browser to display a corresponding target web page, includes: generating a target response file based on the target webpage frame file, wherein the target response file comprises a state code, response header information and the target webpage frame file; and sending the target response file to the browser, so that the browser analyzes the target webpage frame file based on the response header information under the condition that the state code is a preset state code, and obtains and displays a target webpage.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring a webpage access request sent by a browser, wherein the webpage access request comprises a uniform resource locator and identification information of a user initiating the webpage access request; based on the uniform resource identifier and the interpretation program, a first cascade data query statement, an initial webpage frame file and an identification information verification instruction are obtained, wherein the initial webpage frame file comprises a plurality of modules, each module comprises at least one data insertion position, the modules are divided into a static module and a dynamic module, first target data are inserted into each data insertion position in the static module, the first target data are updated according to a preset updating rule, and a placeholder is inserted into each data insertion position in the dynamic module; acquiring second target data from a database based on the identification information, the identification information verification instruction and the first cascade data query statement; replacing corresponding placeholders in the initial webpage frame file by the second target data to obtain a target webpage frame file; and sending the target webpage frame file to the browser so that the browser displays the corresponding target webpage.
In one embodiment, the obtaining, based on the uniform resource identifier and the interpretation program, a first cascade data query statement, an initial web page frame file, and an identification information verification instruction, where the computer program is implemented when the computer program is executed by a processor, includes: acquiring a corresponding first script file based on the uniform resource locator; and analyzing the script program in the first script file by using the interpreter program to obtain a first cascade data query statement, an initial webpage frame file and an identification information verification instruction.
In one embodiment, the obtaining, based on the uniform resource locator, a corresponding first script file implemented when the computer program is executed by the processor includes: acquiring a URL path from the uniform resource locator; and acquiring a corresponding first script file based on the URL path and a preset routing rule.
In one embodiment, the computer program, when executed by the processor, obtains second target data from the database based on the identification information, the identification information verification instruction, and the first cascaded data query statement, including: judging whether an identification information set in the database comprises the identification information or not based on the identification information verification instruction; and if so, acquiring the second target statement from the database based on the first cascade data query statement.
In one embodiment, the predetermined update rule implemented when the computer program is executed by the processor is to update at a predetermined period; the updating process of the first target data comprises the following steps: acquiring a second script file based on the preset period; analyzing the script program in the second script file by using the interpreter program to obtain a second cascade data query statement and a current webpage frame file; acquiring third target data from the database based on the second cascade data query statement; and replacing the corresponding first target data in the current webpage frame file by the third target data.
In one embodiment, the sending the target web page frame file to the browser, when the computer program is executed by the processor, causes the browser to display a corresponding target web page, includes: generating a target response file based on the target webpage frame file, wherein the target response file comprises a state code, response header information and the target webpage frame file; and sending the target response file to the browser, so that the browser analyzes the target webpage frame file based on the response header information under the condition that the state code is a preset state code, and obtains and displays a target webpage.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of: acquiring a webpage access request sent by a browser, wherein the webpage access request comprises a uniform resource locator and identification information of a user initiating the webpage access request; based on the uniform resource identifier and the interpretation program, a first cascade data query statement, an initial webpage frame file and an identification information verification instruction are obtained, wherein the initial webpage frame file comprises a plurality of modules, each module comprises at least one data insertion position, the modules are divided into a static module and a dynamic module, first target data are inserted into each data insertion position in the static module, the first target data are updated according to a preset updating rule, and a placeholder is inserted into each data insertion position in the dynamic module; acquiring second target data from a database based on the identification information, the identification information verification instruction and the first cascade data query statement; replacing corresponding placeholders in the initial webpage frame file by the second target data to obtain a target webpage frame file; and sending the target webpage frame file to the browser so that the browser displays the corresponding target webpage.
In one embodiment, the obtaining, based on the uniform resource identifier and the interpretation program, a first cascade data query statement, an initial web page frame file, and an identification information verification instruction, where the computer program is implemented when the computer program is executed by a processor, includes: acquiring a corresponding first script file based on the uniform resource locator; and analyzing the script program in the first script file by using the interpreter program to obtain a first cascade data query statement, an initial webpage frame file and an identification information verification instruction.
In one embodiment, the obtaining, based on the uniform resource locator, a corresponding first script file implemented when the computer program is executed by the processor includes: acquiring a URL path from the uniform resource locator; and acquiring a corresponding first script file based on the URL path and a preset routing rule.
In one embodiment, the computer program, when executed by the processor, obtains second target data from the database based on the identification information, the identification information verification instruction, and the first cascaded data query statement, including: judging whether an identification information set in the database comprises the identification information or not based on the identification information verification instruction; and if so, acquiring the second target statement from the database based on the first cascade data query statement.
In one embodiment, the predetermined update rule implemented when the computer program is executed by the processor is to update at a predetermined period; the updating process of the first target data comprises the following steps: acquiring a second script file based on the preset period; analyzing the script program in the second script file by using the interpreter program to obtain a second cascade data query statement and a current webpage frame file; acquiring third target data from the database based on the second cascade data query statement; and replacing the corresponding first target data in the current webpage frame file by the third target data.
In one embodiment, the sending the target web page frame file to the browser, when the computer program is executed by the processor, causes the browser to display a corresponding target web page, includes: generating a target response file based on the target webpage frame file, wherein the target response file comprises a state code, response header information and the target webpage frame file; and sending the target response file to the browser, so that the browser analyzes the target webpage frame file based on the response header information under the condition that the state code is a preset state code, and obtains and displays a target webpage.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use, and processing of the related data are required to meet the related regulations.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. A method for displaying a web page, the method comprising:
acquiring a webpage access request sent by a browser, wherein the webpage access request comprises a uniform resource locator and identification information of a user initiating the webpage access request;
based on the uniform resource identifier and the interpretation program, a first cascade data query statement, an initial webpage frame file and an identification information verification instruction are obtained, wherein the initial webpage frame file comprises a plurality of modules, each module comprises at least one data insertion position, the modules are divided into a static module and a dynamic module, first target data are inserted into each data insertion position in the static module, the first target data are updated according to a preset updating rule, and a placeholder is inserted into each data insertion position in the dynamic module;
Acquiring second target data from a database based on the identification information, the identification information verification instruction and the first cascade data query statement;
replacing corresponding placeholders in the initial webpage frame file by the second target data to obtain a target webpage frame file;
and sending the target webpage frame file to the browser so that the browser displays the corresponding target webpage.
2. The method according to claim 1, wherein the obtaining, based on the uniform resource identifier and the interpretation program, the first cascaded data query sentence, the initial web page frame file, and the identification information verification instruction includes:
acquiring a corresponding first script file based on the uniform resource locator;
and analyzing the script program in the first script file by using the interpreter program to obtain a first cascade data query statement, an initial webpage frame file and an identification information verification instruction.
3. The method of claim 2, wherein the obtaining the corresponding first script file based on the uniform resource locator comprises:
acquiring a URL path from the uniform resource locator;
And acquiring a corresponding first script file based on the URL path and a preset routing rule.
4. The method of claim 1, wherein the obtaining second target data from a database based on the identification information, the identification information verification instruction, and the first cascaded data query statement comprises:
judging whether an identification information set in the database comprises the identification information or not based on the identification information verification instruction;
and if so, acquiring the second target statement from the database based on the first cascade data query statement.
5. The method of claim 1, wherein the predetermined update rule is to update at a predetermined period; the updating process of the first target data comprises the following steps:
acquiring a second script file based on the preset period;
analyzing the script program in the second script file by using the interpreter program to obtain a second cascade data query statement and a current webpage frame file;
acquiring third target data from the database based on the second cascade data query statement;
and replacing the corresponding first target data in the current webpage frame file by the third target data.
6. The method of claim 1, wherein the sending the target web page frame file to the browser to cause the browser to display the corresponding target web page comprises:
generating a target response file based on the target webpage frame file, wherein the target response file comprises a state code, response header information and the target webpage frame file;
and sending the target response file to the browser, so that the browser analyzes the target webpage frame file based on the response header information under the condition that the state code is a preset state code, and obtains and displays a target webpage.
7. A web page display device, the device comprising:
the first acquisition module is used for acquiring a webpage access request sent by a browser, wherein the webpage access request comprises a uniform resource locator and identification information of a user initiating the webpage access request;
the second acquisition module is used for acquiring a first cascade data query statement, an initial webpage frame file and an identification information verification instruction based on the uniform resource identifier and the interpretation program, wherein the initial webpage frame file comprises a plurality of modules, each module comprises at least one data insertion position, the plurality of modules are divided into a static module and a dynamic module, each data insertion position in the static module is inserted with first target data, the first target data is updated according to a preset updating rule, and each data insertion position in the dynamic module is inserted with a placeholder;
The third acquisition module is used for acquiring second target data from a database based on the identification information, the identification information verification instruction and the first cascade data query statement;
a fourth obtaining module, configured to replace a corresponding placeholder in the initial web page frame file with the second target data to obtain a target web page frame file;
and the display module is used for sending the target webpage frame file to the browser so as to enable the browser to display the corresponding target webpage.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202311615128.4A 2023-11-29 2023-11-29 Webpage display method, device, equipment, medium and product Pending CN117708450A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311615128.4A CN117708450A (en) 2023-11-29 2023-11-29 Webpage display method, device, equipment, medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311615128.4A CN117708450A (en) 2023-11-29 2023-11-29 Webpage display method, device, equipment, medium and product

Publications (1)

Publication Number Publication Date
CN117708450A true CN117708450A (en) 2024-03-15

Family

ID=90156164

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311615128.4A Pending CN117708450A (en) 2023-11-29 2023-11-29 Webpage display method, device, equipment, medium and product

Country Status (1)

Country Link
CN (1) CN117708450A (en)

Similar Documents

Publication Publication Date Title
CN105335404B (en) Page info loading method and device
US9959254B2 (en) Representation of an element in a page via an identifier
WO2020192134A1 (en) Exception handling method and apparatus based on spring mvc, and computer device and storage medium
US20190251087A1 (en) Method and apparatus for providing aggregate result of question-and-answer information
WO2021042508A1 (en) Webpage generation method and device, computer device and storage medium
CN111090797B (en) Data acquisition method, device, computer equipment and storage medium
WO2022063133A1 (en) Sensitive information detection method and apparatus, and device and computer-readable storage medium
CN110147476A (en) Data crawling method, terminal device and computer readable storage medium based on Scrapy
CN105678127A (en) Verification method and device for identity information
CN110750443A (en) Webpage testing method and device, computer equipment and storage medium
CN113641712B (en) Hit processing method, device, equipment and storage medium for complex event
CN109542764B (en) Webpage automatic testing method and device, computer equipment and storage medium
CN113918437A (en) User behavior data analysis method and device, computer equipment and storage medium
CN116644250B (en) Page detection method, page detection device, computer equipment and storage medium
CN116661936A (en) Page data processing method and device, computer equipment and storage medium
CN116821533A (en) Page rendering method, computer device and computer-readable storage medium
CN117708450A (en) Webpage display method, device, equipment, medium and product
US9098174B1 (en) Expanding the functionality of the browser URL box
CN115080154A (en) Page display method and device, storage medium and electronic equipment
CN110825976B (en) Website page detection method and device, electronic equipment and medium
CN113221035A (en) Method, apparatus, device, medium, and program product for determining an abnormal web page
CN112631905A (en) Execution process data management method and device, computer equipment and storage medium
CN115118616B (en) Display result testing method, device, computer equipment and storage medium
US11960560B1 (en) Methods for analyzing recurring accessibility issues with dynamic web site behavior and devices thereof
CN117370695A (en) Page display method, device, equipment, medium and product

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