[go: up one dir, main page]

CN112487339B - Response method, device, equipment and storage medium for Web page request - Google Patents

Response method, device, equipment and storage medium for Web page request Download PDF

Info

Publication number
CN112487339B
CN112487339B CN202011453168.XA CN202011453168A CN112487339B CN 112487339 B CN112487339 B CN 112487339B CN 202011453168 A CN202011453168 A CN 202011453168A CN 112487339 B CN112487339 B CN 112487339B
Authority
CN
China
Prior art keywords
file
static resource
web page
remote
page request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011453168.XA
Other languages
Chinese (zh)
Other versions
CN112487339A (en
Inventor
徐林通
范渊
杨勃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
DBAPPSecurity Co Ltd
Original Assignee
DBAPPSecurity 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 DBAPPSecurity Co Ltd filed Critical DBAPPSecurity Co Ltd
Priority to CN202011453168.XA priority Critical patent/CN112487339B/en
Publication of CN112487339A publication Critical patent/CN112487339A/en
Application granted granted Critical
Publication of CN112487339B publication Critical patent/CN112487339B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/22Procedural
    • 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

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a response method of a Web page request, which is applied to a back-end local server and comprises the following steps: receiving a Web page request sent by a front-end remote server; analyzing the Web page request to obtain a target static resource file to be acquired; acquiring a target static resource file from a rear-end local preset directory by utilizing a Spring Boot frame, and constructing a service running environment by utilizing the target static resource file so as to respond to a Web page request; each static resource file in the back-end local preset directory is pulled from the front-end remote server through a JSch frame. By applying the response method of the Web page request, the management and maintenance cost of the back-end developer on the front-end static resource is reduced, and the response efficiency of the Web page request is improved. The invention also discloses a response device, equipment and storage medium for the Web page request, which have corresponding technical effects.

Description

一种Web页面请求的响应方法、装置、设备及存储介质Response method, device, equipment and storage medium for web page request

技术领域technical field

本发明涉及软件开发技术领域,特别是涉及一种Web页面请求的响应方法、装置、设备及计算机可读存储介质。The invention relates to the technical field of software development, in particular to a method, device, equipment and computer-readable storage medium for responding to a Web page request.

背景技术Background technique

随着软件工程理论和现代化软件开发技术应用的发展,单一软件所能提供的功能越来越复杂,代码量也越来越大。为了系统性的、规范化的、可定量的过程化方法去开发和维护软件,明确的职能分工也必不可少。With the development of software engineering theory and the application of modern software development technology, the functions that a single software can provide are becoming more and more complex, and the amount of code is also increasing. In order to develop and maintain software in a systematic, standardized, and quantifiable process-based approach, a clear division of functions is also essential.

现在一个普通Web软件往往由前端静态资源和后端Web服务组成。前端静态资源由前端开发人员完成,提供页面样式排版和用户交互功能。后端Web服务则由后端开发人员完成,提供具体的业务实现和数据持久化能力。部分软件项目前后端结合较为紧密,在对前端Web页面请求的响应的过程中,需要后端服务器提供相应的服务运行环境支持。而大部分软件开发人员都只擅长自己实际应用的技术方向,如后端开发人员往往对前端开发人员所使用的技术框架和构建方式不甚了解,反之亦然。从而导致后端开发人员对前端静态资源的管理和维护成本高,Web页面请求响应效率低。Now an ordinary web software often consists of front-end static resources and back-end web services. Front-end static resources are completed by front-end developers, providing page style layout and user interaction functions. Back-end Web services are completed by back-end developers, providing specific business implementation and data persistence capabilities. Some software projects are closely integrated with the front and back ends. In the process of responding to the front-end Web page requests, the back-end server is required to provide corresponding service operating environment support. However, most software developers are only good at the technical direction of their actual application. For example, back-end developers often don't know much about the technical framework and construction methods used by front-end developers, and vice versa. As a result, the management and maintenance costs of front-end static resources for back-end developers are high, and the response efficiency of Web page requests is low.

综上所述,如何有效地解决后端开发人员对前端静态资源的管理和维护成本高,Web页面请求响应效率低等问题,是目前本领域技术人员急需解决的问题。To sum up, how to effectively solve the problems of high cost of management and maintenance of front-end static resources by back-end developers and low efficiency of Web page request response is an urgent problem for those skilled in the art.

发明内容Contents of the invention

本发明的目的是提供一种Web页面请求的响应方法,该方法降低了后端开发人员对前端静态资源的管理和维护成本,提高了Web页面请求响应效率;本发明的另一目的是提供一种Web页面请求的响应装置、设备及计算机可读存储介质。The purpose of the present invention is to provide a method for responding to Web page requests, which reduces the management and maintenance costs of front-end static resources for back-end developers, and improves Web page request response efficiency; another purpose of the present invention is to provide a A response device, device, and computer-readable storage medium for a Web page request.

为解决上述技术问题,本发明提供如下技术方案:In order to solve the above technical problems, the present invention provides the following technical solutions:

一种Web页面请求的响应方法,应用于后端本地服务器,包括:A method for responding to web page requests, applied to the backend local server, including:

接收前端远程服务器发送的Web页面请求;Receive the web page request sent by the front-end remote server;

对所述Web页面请求进行解析,得到待获取的目标静态资源文件;Analyzing the web page request to obtain the target static resource file to be acquired;

利用Spring Boot框架从后端本地预设目录中获取所述目标静态资源文件,并利用所述目标静态资源文件进行服务运行环境搭建,以对所述Web页面请求进行响应;Using the Spring Boot framework to obtain the target static resource file from the back-end local preset directory, and using the target static resource file to build a service operating environment to respond to the Web page request;

其中,所述后端本地预设目录中的各静态资源文件为通过JSch框架从所述前端远程服务器中拉取得到。Wherein, each static resource file in the back-end local preset directory is obtained by pulling from the front-end remote server through the JSch framework.

在本发明的一种具体实施方式中,在利用Spring Boot框架从后端本地预设目录中获取所述目标静态资源之后,还包括:In a specific implementation of the present invention, after using the Spring Boot framework to obtain the target static resource from the back-end local preset directory, it also includes:

利用Nginx反向代理服务器反向代理所述Spring Boot框架。Use the Nginx reverse proxy server to reverse proxy the Spring Boot framework.

在本发明的一种具体实施方式中,还包括:In a specific embodiment of the present invention, also include:

利用所述JSch框架对所述后端本地预设目录中的各所述静态资源文件进行更新操作。Using the JSch framework to update each of the static resource files in the backend local preset directory.

在本发明的一种具体实施方式中,利用所述JSch框架对所述后端本地预设目录中的各所述静态资源文件进行更新操作,包括:In a specific embodiment of the present invention, using the JSch framework to update each of the static resource files in the back-end local preset directory includes:

分别获取所述前端远程服务器中各所述静态资源文件分别对应的远程文件更新时间,以及所述后端本地预设目录中各所述静态资源文件分别对应的本地文件更新时间;Respectively obtain the remote file update time corresponding to each of the static resource files in the front-end remote server, and the local file update time corresponding to each of the static resource files in the back-end local preset directory;

判断各所述远程文件更新时间中是否存在大于相应的本地文件更新时间的远程文件更新时间;Judging whether there is a remote file update time greater than the corresponding local file update time in each of the remote file update times;

若是,则将大于相应的本地文件更新时间的远程文件更新时间对应的远程静态资源文件确定为目标远程静态资源文件;If so, then determine the remote static resource file corresponding to the remote file update time greater than the corresponding local file update time as the target remote static resource file;

利用所述JSch框架从所述前端远程服务器中拉取所述目标远程静态资源文件,以利用所述目标远程静态资源文件替换所述后端本地预设目录中相应的静态资源文件。Using the JSch framework to pull the target remote static resource file from the front-end remote server to replace the corresponding static resource file in the back-end local preset directory with the target remote static resource file.

在本发明的一种具体实施方式中,在利用所述目标远程静态资源文件替换所述后端本地预设目录中相应的静态资源文件之后,还包括:In a specific implementation manner of the present invention, after using the target remote static resource file to replace the corresponding static resource file in the back-end local preset directory, it further includes:

遍历所述后端本地预设目录中各所述静态资源文件分别对应的全路径文件名;Traversing the full path file names corresponding to each of the static resource files in the back-end local preset directory;

判断各所述全路径文件名是否均存在于全路径文件名列表中;其中,所述全路径文件名列表为根据所述后端本地预设目录中的各所述静态资源文件的存活状态生成的列表;Judging whether each of the full-path file names exists in the full-path file name list; wherein, the full-path file name list is generated according to the survival status of each of the static resource files in the back-end local preset directory list of;

若否,则将所述后端本地预设目录中未存在于所述全路径文件名列表的全路径文件名对应的静态资源文件删除。If not, delete the static resource files corresponding to the full-path file names that do not exist in the full-path file name list in the back-end local preset directory.

一种Web页面请求的响应装置,应用于后端本地服务器,包括:A response device for a web page request, applied to a backend local server, comprising:

请求接收模块,用于接收前端远程服务器发送的Web页面请求;The request receiving module is used to receive the Web page request sent by the front-end remote server;

请求解析模块,用于对所述Web页面请求进行解析,得到待获取的目标静态资源文件;A request parsing module, configured to parse the web page request to obtain the target static resource file to be acquired;

请求响应模块,用于利用Spring Boot框架从后端本地预设目录中获取所述目标静态资源文件,并利用所述目标静态资源文件进行服务运行环境搭建,以对所述Web页面请求进行响应;The request response module is used to obtain the target static resource file from the back-end local preset directory by using the Spring Boot framework, and use the target static resource file to build a service operating environment to respond to the Web page request;

其中,所述后端本地预设目录中的各静态资源文件为通过JSch框架从所述前端远程服务器中拉取得到。Wherein, each static resource file in the back-end local preset directory is obtained by pulling from the front-end remote server through the JSch framework.

在本发明的一种具体实施方式中,还包括:In a specific embodiment of the present invention, also include:

反向代理模块,用于在利用Spring Boot框架从后端本地预设目录中获取所述目标静态资源之后,利用Nginx反向代理服务器反向代理所述Spring Boot框架。The reverse proxy module is used to use the Nginx reverse proxy server to reverse proxy the Spring Boot framework after using the Spring Boot framework to obtain the target static resource from the backend local preset directory.

在本发明的一种具体实施方式中,还包括:In a specific embodiment of the present invention, also include:

文件更新模块,用于利用所述JSch框架对所述后端本地预设目录中的各所述静态资源文件进行更新操作。A file update module, configured to use the JSch framework to update each of the static resource files in the back-end local preset directory.

一种Web页面请求的响应设备,包括:A device for responding to web page requests, including:

存储器,用于存储计算机程序;memory for storing computer programs;

处理器,用于执行所述计算机程序时实现如前所述Web页面请求的响应方法的步骤。The processor is configured to implement the steps of the method for responding to a Web page request as described above when executing the computer program.

一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如前所述Web页面请求的响应方法的步骤。A computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above method for responding to a Web page request are implemented.

本发明所提供的Web页面请求的响应方法,应用于后端本地服务器,接收前端远程服务器发送的Web页面请求;对Web页面请求进行解析,得到待获取的目标静态资源文件;利用Spring Boot框架从后端本地预设目录中获取目标静态资源文件,并利用目标静态资源文件进行服务运行环境搭建,以对Web页面请求进行响应;其中,后端本地预设目录中的各静态资源文件为通过JSch框架从前端远程服务器中拉取得到。通过预先部署Spring Boot框架和JSch框架,利用JSch框架从前端远程服务器中预先拉取各静态资源文件至后端本地预设目录,并利用Spring Boot框架作为服务代理从后端本地预设目录中获取目标静态资源文件,从而降低了后端开发人员对前端静态资源的管理和维护成本,提高了Web页面请求响应效率。The response method of the Web page request provided by the present invention is applied to the back-end local server, and receives the Web page request sent by the front-end remote server; parses the Web page request to obtain the target static resource file to be obtained; utilizes the Spring Boot framework from Obtain the target static resource files in the back-end local preset directory, and use the target static resource files to build the service operating environment to respond to web page requests; among them, each static resource file in the back-end local preset directory is passed through JSch Frameworks are pulled from the front-end remote server. By pre-deploying the Spring Boot framework and the JSch framework, use the JSch framework to pre-pull each static resource file from the front-end remote server to the back-end local preset directory, and use the Spring Boot framework as a service proxy to obtain it from the back-end local preset directory Target static resource files, thereby reducing the management and maintenance costs of front-end static resources for back-end developers, and improving the efficiency of Web page request response.

相应的,本发明还提供了与上述Web页面请求的响应方法相对应的Web页面请求的响应装置、设备和计算机可读存储介质,具有上述技术效果,在此不再赘述。Correspondingly, the present invention also provides a Web page request response device, device, and computer-readable storage medium corresponding to the above-mentioned method for responding to a Web page request, which have the above-mentioned technical effects and will not be repeated here.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1为本发明实施例中Web页面请求的响应方法的一种实施流程图;Fig. 1 is a kind of implementation flowchart of the response method of Web page request in the embodiment of the present invention;

图2为本发明实施例中Web页面请求的响应方法的另一种实施流程图;Fig. 2 is another implementation flowchart of the response method of Web page request in the embodiment of the present invention;

图3为本发明实施例中一种Web页面请求的响应装置的结构框图;Fig. 3 is a structural block diagram of a response device for a Web page request in an embodiment of the present invention;

图4为本发明实施例中一种Web页面请求的响应设备的结构框图。Fig. 4 is a structural block diagram of a device responding to a Web page request in an embodiment of the present invention.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本发明方案,下面结合附图和具体实施方式对本发明作进一步的详细说明。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to enable those skilled in the art to better understand the solution of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. Apparently, the described embodiments are only some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

实施例一:Embodiment one:

参见图1,图1为本发明实施例中Web页面请求的响应方法的一种实施流程图,应用于后端本地服务器,该方法可以包括以下步骤:Referring to Fig. 1, Fig. 1 is a kind of implementation flowchart of the response method of Web page request in the embodiment of the present invention, is applied to back-end local server, and this method can comprise the following steps:

S101:接收前端远程服务器发送的Web页面请求。S101: Receive a web page request sent by a front-end remote server.

当用户需要在前端远程服务器中进行Web页面浏览时,前端远程服务器根据用户输入的浏览指令生成Web页面请求,并向后端本地服务器发送Web页面请求。后端本地服务器接收前端远程服务器发送的Web页面请求。When a user needs to browse a Web page in the front-end remote server, the front-end remote server generates a Web page request according to the browsing instruction input by the user, and sends the Web page request to the back-end local server. The back-end local server receives the web page request sent by the front-end remote server.

S102:对Web页面请求进行解析,得到待获取的目标静态资源文件。S102: Analyzing the web page request to obtain the target static resource file to be obtained.

Web页面请求中包含待获取的目标静态资源文件。后端本地服务器在接收到Web页面请求之后,通过对Web页面请求进行解析,得到待获取的目标静态资源文件。The web page request includes the target static resource file to be obtained. After receiving the web page request, the backend local server parses the web page request to obtain the target static resource file to be obtained.

待获取的目标静态资源文件可以包括图片文件、脚本文件等。The target static resource files to be obtained may include image files, script files, and the like.

S103:利用Spring Boot框架从后端本地预设目录中获取目标静态资源文件,并利用目标静态资源文件进行服务运行环境搭建,以对Web页面请求进行响应。S103: Use the Spring Boot framework to obtain the target static resource file from the back-end local preset directory, and use the target static resource file to build a service operating environment to respond to the web page request.

其中,所述后端本地预设目录中的各静态资源文件为通过JSch框架从所述前端远程服务器中拉取得到。Wherein, each static resource file in the back-end local preset directory is obtained by pulling from the front-end remote server through the JSch framework.

预先部署Spring Boot框架和JSch框架,并预先创建后端本地预设目录,利用JSch框架从前端远程服务器中预先拉取各静态资源文件至后端本地预设目录。在解析得到待获取的目标静态资源文件之后,利用Spring Boot框架作为服务代理从后端本地预设目录中获取目标静态资源文件,并利用目标静态资源文件进行服务运行环境搭建,从而实现前后端协同对Web页面请求进行快速响应。降低了后端开发人员对前端静态资源的管理和维护成本,提高了Web页面请求响应效率。Pre-deploy the Spring Boot framework and JSch framework, and pre-create the back-end local default directory, and use the JSch framework to pre-pull each static resource file from the front-end remote server to the back-end local default directory. After parsing the target static resource file to be obtained, use the Spring Boot framework as a service proxy to obtain the target static resource file from the back-end local preset directory, and use the target static resource file to build the service operating environment to achieve front-end and back-end collaboration Respond quickly to web page requests. It reduces the management and maintenance costs of front-end static resources for back-end developers, and improves the efficiency of Web page request response.

Spring Boot框架其设计目的是用来简化新Spring应用的初始搭建以及开发过程。该框架使用了特定的方式来进行配置,从而使开发人员不再需要定义样板化的配置。The Spring Boot framework is designed to simplify the initial setup and development of new Spring applications. The framework uses a specific approach to configuration, so that developers no longer need to define boilerplate configuration.

JSch框架是SSH2的一个纯Java实现。它允许你连接到一个sshd服务器,使用端口转发,X11转发,文件传输等能力完成指定功能。The JSch framework is a pure Java implementation of SSH2. It allows you to connect to an sshd server and perform specified functions using port forwarding, X11 forwarding, file transfer and other capabilities.

本发明所提供的Web页面请求的响应方法,应用于后端本地服务器,接收前端远程服务器发送的Web页面请求;对Web页面请求进行解析,得到待获取的目标静态资源文件;利用Spring Boot框架从后端本地预设目录中获取目标静态资源文件,并利用目标静态资源文件进行服务运行环境搭建,以对Web页面请求进行响应;其中,后端本地预设目录中的各静态资源文件为通过JSch框架从前端远程服务器中拉取得到。通过预先部署Spring Boot框架和JSch框架,利用JSch框架从前端远程服务器中预先拉取各静态资源文件至后端本地预设目录,并利用Spring Boot框架作为服务代理从后端本地预设目录中获取目标静态资源文件,从而降低了后端开发人员对前端静态资源的管理和维护成本,提高了Web页面请求响应效率。The response method of the Web page request provided by the present invention is applied to the back-end local server, and receives the Web page request sent by the front-end remote server; parses the Web page request to obtain the target static resource file to be obtained; utilizes the Spring Boot framework from Obtain the target static resource files in the back-end local preset directory, and use the target static resource files to build the service operating environment to respond to web page requests; among them, each static resource file in the back-end local preset directory is passed through JSch Frameworks are pulled from the front-end remote server. By pre-deploying the Spring Boot framework and the JSch framework, use the JSch framework to pre-pull each static resource file from the front-end remote server to the back-end local preset directory, and use the Spring Boot framework as a service proxy to obtain it from the back-end local preset directory Target static resource files, thereby reducing the management and maintenance costs of front-end static resources for back-end developers, and improving the efficiency of Web page request response.

需要说明的是,基于上述实施例一,本发明实施例还提供了相应的改进方案。在后续实施例中涉及与上述实施例一中相同步骤或相应步骤之间可相互参考,相应的有益效果也可相互参照,在下文的改进实施例中不再一一赘述。It should be noted that, based on the first embodiment above, the embodiment of the present invention also provides a corresponding improvement solution. In subsequent embodiments, the same steps as in the first embodiment above or corresponding steps may be referred to each other, and the corresponding beneficial effects may also be referred to each other, and will not be repeated in the improved embodiments below.

实施例二:Embodiment two:

参见图2,图2为本发明实施例中Web页面请求的响应方法的另一种实施流程图,应用于后端本地服务器,该方法可以包括以下步骤:Referring to Fig. 2, Fig. 2 is another implementation flowchart of the response method of the Web page request in the embodiment of the present invention, applied to the backend local server, the method may include the following steps:

S201:接收前端远程服务器发送的Web页面请求。S201: Receive a web page request sent by a front-end remote server.

S202:对Web页面请求进行解析,得到待获取的目标静态资源文件。S202: Analyzing the web page request to obtain the target static resource file to be obtained.

S203:利用Spring Boot框架从后端本地预设目录中获取目标静态资源文件。S203: Obtain the target static resource file from the backend local preset directory by using the Spring Boot framework.

S204:利用Nginx反向代理服务器反向代理Spring Boot框架。S204: Utilize the Nginx reverse proxy server to reverse proxy the Spring Boot framework.

预先部署Nginx反向代理服务器,利用Nginx反向代理服务器反向代理SpringBoot框架。从而无需让后端开发人员关心前端远程服务器中各静态资源文件的存放位置和后续改动,提高了文件获取效率和成功率。Pre-deploy the Nginx reverse proxy server and use the Nginx reverse proxy server to reverse proxy the SpringBoot framework. Therefore, there is no need for back-end developers to care about the storage location and subsequent changes of each static resource file in the front-end remote server, which improves the efficiency and success rate of file acquisition.

S205:利用目标静态资源文件进行服务运行环境搭建,以对Web页面请求进行响应。S205: Use the target static resource file to build a service operating environment to respond to the web page request.

其中,后端本地预设目录中的各静态资源文件为通过JSch框架从前端远程服务器中拉取得到。Wherein, each static resource file in the back-end local default directory is pulled from the front-end remote server through the JSch framework.

S206:分别获取前端远程服务器中各静态资源文件分别对应的远程文件更新时间,以及后端本地预设目录中各静态资源文件分别对应的本地文件更新时间。S206: Respectively obtain the remote file update time corresponding to each static resource file in the front-end remote server, and the local file update time corresponding to each static resource file in the back-end local preset directory.

前端远程服务器中各静态资源文件会随着业务变化进行更新操作,为保证前后端静态资源文件的一致性,后端本地预设目录中各静态资源文件也会相应进行更新操作。可以实时或按照预先设定的时间间隔,分别获取前端远程服务器中各静态资源文件分别对应的远程文件更新时间,以及后端本地预设目录中各静态资源文件分别对应的本地文件更新时间。Each static resource file in the front-end remote server will be updated with business changes. To ensure the consistency of the front-end and back-end static resource files, each static resource file in the back-end local preset directory will also be updated accordingly. The remote file update time corresponding to each static resource file in the front-end remote server and the local file update time corresponding to each static resource file in the back-end local preset directory can be obtained in real time or according to a preset time interval.

S207:判断各远程文件更新时间中是否存在大于相应的本地文件更新时间的远程文件更新时间,若是,则执行步骤S208,若否,则不做处理。S207: Determine whether there is a remote file update time greater than the corresponding local file update time in each remote file update time, if yes, perform step S208, if not, do not process.

在获取到前端远程服务器中各静态资源文件分别对应的远程文件更新时间,以及后端本地预设目录中各静态资源文件分别对应的本地文件更新时间之后,判断各远程文件更新时间中是否存在大于相应的本地文件更新时间的远程文件更新时间,若是,则说明前端远程服务器中存在相对于后端本地预设目录更新的静态资源文件,则执行步骤S208,若否,则说明当前前端远程服务器与后端本地预设目录中的静态资源文件相同,不需要做任何处理。After obtaining the remote file update time corresponding to each static resource file in the front-end remote server, and the local file update time corresponding to each static resource file in the back-end local preset directory, determine whether there is any remote file update time greater than The remote file update time of the corresponding local file update time. If yes, it means that there is a static resource file updated with respect to the back-end local preset directory in the front-end remote server, and then step S208 is executed. If not, it means that the current front-end remote server and The static resource files in the backend local preset directory are the same and do not need any processing.

S208:将大于相应的本地文件更新时间的远程文件更新时间对应的远程静态资源文件确定为目标远程静态资源文件。S208: Determine the remote static resource file corresponding to the remote file update time greater than the corresponding local file update time as the target remote static resource file.

当确定各远程文件更新时间中存在大于相应的本地文件更新时间的远程文件更新时间时,说明前端远程服务器中存在相对于后端本地预设目录更新的静态资源文件,将大于相应的本地文件更新时间的远程文件更新时间对应的远程静态资源文件确定为目标远程静态资源文件。When it is determined that there is a remote file update time greater than the corresponding local file update time in each remote file update time, it means that there is a static resource file updated relative to the back-end local preset directory in the front-end remote server, which will be greater than the corresponding local file update time The remote static resource file corresponding to the remote file update time of time is determined as the target remote static resource file.

S209:利用JSch框架从前端远程服务器中拉取目标远程静态资源文件,以利用目标远程静态资源文件替换后端本地预设目录中相应的静态资源文件。S209: Use the JSch framework to pull the target remote static resource file from the front-end remote server, so as to replace the corresponding static resource file in the back-end local preset directory with the target remote static resource file.

在确定目标远程静态资源文件之后,利用JSch框架从前端远程服务器中拉取目标远程静态资源文件,利用目标远程静态资源文件替换后端本地预设目录中相应的静态资源文件,从而使得前端远程服务器与后端本地预设目录中的静态资源文件保持一致。After determining the target remote static resource file, use the JSch framework to pull the target remote static resource file from the front-end remote server, and use the target remote static resource file to replace the corresponding static resource file in the back-end local preset directory, so that the front-end remote server Be consistent with the static resource files in the backend local preset directory.

S210:遍历后端本地预设目录中各静态资源文件分别对应的全路径文件名。S210: Traversing the full path file names corresponding to the respective static resource files in the backend local preset directory.

在利用目标远程静态资源文件替换后端本地预设目录中相应的静态资源文件之后,遍历后端本地预设目录中各静态资源文件分别对应的全路径文件名。After the target remote static resource file is used to replace the corresponding static resource file in the backend local preset directory, the full path file names corresponding to the respective static resource files in the backend local preset directory are traversed.

S211:判断各全路径文件名是否均存在于全路径文件名列表中,若是,则不做处理,若否,则执行步骤S212。S211: Determine whether each full-path file name exists in the full-path file name list, if yes, do not process, if not, execute step S212.

其中,全路径文件名列表为根据后端本地预设目录中的各静态资源文件的存活状态生成的列表。Wherein, the full path file name list is a list generated according to the survival status of each static resource file in the backend local preset directory.

预先根据后端本地预设目录中的各静态资源文件的存活状态建立全路径文件名列表,并根据后端本地预设目录中的各静态资源文件的存活状态更新情况对全路径文件名列表进行相应更新。在遍历后端本地预设目录中各静态资源文件分别对应的全路径文件名之后,判断各全路径文件名是否均存在于全路径文件名列表中,若是,则说明前端远程服务器的本次更新不存在静态资源文件删除操作,不做处理,若否,则说明前端远程服务器的本次更新存在静态资源文件删除操作,执行步骤S212。Establish a full path file name list in advance according to the survival status of each static resource file in the back-end local default directory, and update the full path file name list according to the survival status update status of each static resource file in the back-end local default directory Update accordingly. After traversing the full-path file names corresponding to each static resource file in the back-end local default directory, determine whether each full-path file name exists in the full-path file name list. If so, it means this update of the front-end remote server If there is no static resource file deletion operation, no processing is performed. If not, it means that there is a static resource file deletion operation in this update of the front-end remote server, and step S212 is executed.

S212:将后端本地预设目录中未存在于全路径文件名列表的全路径文件名对应的静态资源文件删除。S212: Delete static resource files corresponding to full-path file names that do not exist in the full-path file name list in the backend local preset directory.

当确定各全路径文件名为均存在于全路径文件名列表中时,说明前端远程服务器的本次更新存在静态资源文件删除操作,将后端本地预设目录中未存在于全路径文件名列表的全路径文件名对应的静态资源文件删除。When it is determined that each full path file name exists in the full path file name list, it means that there is a static resource file deletion operation in the update of the front-end remote server, and the back-end local preset directory does not exist in the full path file name list Delete the static resource file corresponding to the full path file name.

本实施例区别于独立权利要求1所要求保护的技术方案对应的实施例一,还增加了从属权利要求2至5对应要求保护的技术方案,当然,根据实际情况和要求的不同,可将各从属权利要求对应要求保护的技术方案在不影响方案完整性的基础上进行灵活组合,以更加符合不同使用场景的要求,本实施例只是给出了其中一种包含方案最多、效果最优的方案,因为情况复杂,无法对所有可能存在的方案一一列举,本领域技术人员应能意识到根据本申请提供的基本方法原理结合实际情况可以存在很多的例子,在不付出足够的创造性劳动下,应均在本申请的保护范围内。This embodiment is different from Embodiment 1 corresponding to the technical solution claimed in independent claim 1, and also adds the technical solutions corresponding to the protected claims in dependent claims 2 to 5. Of course, according to different actual conditions and requirements, each The technical solutions required to be protected in the dependent claims are flexibly combined on the basis of not affecting the integrity of the solutions, so as to better meet the requirements of different usage scenarios. This embodiment only provides one of the solutions that contains the most solutions and has the best effect , because the situation is complicated, it is impossible to list all possible solutions. Those skilled in the art should be able to realize that there may be many examples based on the basic method principles provided by this application combined with actual situations. Without sufficient creative work, All should be within the scope of protection of this application.

相应于上面的方法实施例,本发明还提供了一种Web页面请求的响应装置,下文描述的Web页面请求的响应装置与上文描述的Web页面请求的响应装置可相互对应参照。Corresponding to the above method embodiment, the present invention also provides a Web page request response device, and the Web page request response device described below and the Web page request response device described above can be referred to in correspondence.

参见图3,图3为本发明实施例中一种Web页面请求的响应装置的结构框图,应用于后端本地服务器,该装置可以包括:Referring to FIG. 3, FIG. 3 is a structural block diagram of a device for responding to a Web page request in an embodiment of the present invention, which is applied to a backend local server, and the device may include:

请求接收模块31,用于接收前端远程服务器发送的Web页面请求;Request receiving module 31, is used for receiving the Web page request that front-end remote server sends;

请求解析模块32,用于对Web页面请求进行解析,得到待获取的目标静态资源文件;The request parsing module 32 is used for parsing the Web page request to obtain the target static resource file to be acquired;

请求响应模块33,用于利用Spring Boot框架从后端本地预设目录中获取目标静态资源文件,并利用目标静态资源文件进行服务运行环境搭建,以对Web页面请求进行响应;The request response module 33 is used to use the Spring Boot framework to obtain the target static resource file from the back-end local preset directory, and use the target static resource file to build a service operating environment to respond to the Web page request;

其中,后端本地预设目录中的各静态资源文件为通过JSch框架从前端远程服务器中拉取得到。Wherein, each static resource file in the back-end local default directory is pulled from the front-end remote server through the JSch framework.

本发明所提供的Web页面请求的响应装置,应用于后端本地服务器,接收前端远程服务器发送的Web页面请求;对Web页面请求进行解析,得到待获取的目标静态资源文件;利用Spring Boot框架从后端本地预设目录中获取目标静态资源文件,并利用目标静态资源文件进行服务运行环境搭建,以对Web页面请求进行响应;其中,后端本地预设目录中的各静态资源文件为通过JSch框架从前端远程服务器中拉取得到。通过预先部署Spring Boot框架和JSch框架,利用JSch框架从前端远程服务器中预先拉取各静态资源文件至后端本地预设目录,并利用Spring Boot框架作为服务代理从后端本地预设目录中获取目标静态资源文件,从而降低了后端开发人员对前端静态资源的管理和维护成本,提高了Web页面请求响应效率。The response device for the Web page request provided by the present invention is applied to the back-end local server, and receives the Web page request sent by the front-end remote server; parses the Web page request to obtain the target static resource file to be obtained; utilizes the Spring Boot framework from Obtain the target static resource files in the back-end local preset directory, and use the target static resource files to build the service operating environment to respond to web page requests; among them, each static resource file in the back-end local preset directory is passed through JSch Frameworks are pulled from the front-end remote server. By pre-deploying the Spring Boot framework and the JSch framework, use the JSch framework to pre-pull each static resource file from the front-end remote server to the back-end local preset directory, and use the Spring Boot framework as a service proxy to obtain it from the back-end local preset directory Target static resource files, thereby reducing the management and maintenance costs of front-end static resources for back-end developers, and improving the efficiency of Web page request response.

在本发明的一种具体实施方式中,该装置还可以包括:In a specific embodiment of the present invention, the device may also include:

反向代理模块,用于在利用Spring Boot框架从后端本地预设目录中获取目标静态资源之后,利用Nginx反向代理服务器反向代理Spring Boot框架。The reverse proxy module is used to use the Nginx reverse proxy server to reverse proxy the Spring Boot framework after using the Spring Boot framework to obtain the target static resources from the back-end local preset directory.

在本发明的一种具体实施方式中,该装置还可以包括:In a specific embodiment of the present invention, the device may also include:

文件更新模块,用于利用JSch框架对后端本地预设目录中的各静态资源文件进行更新操作。The file update module is used to update each static resource file in the back-end local preset directory by using the JSch framework.

在本发明的一种具体实施方式中,文件更新模块包括:In a specific embodiment of the present invention, the file update module includes:

更新时间获取子模块,用于分别获取前端远程服务器中各静态资源文件分别对应的远程文件更新时间,以及后端本地预设目录中各静态资源文件分别对应的本地文件更新时间;The update time acquisition sub-module is used to respectively acquire the remote file update time corresponding to each static resource file in the front-end remote server, and the local file update time corresponding to each static resource file in the back-end local preset directory;

第一判断子模块,用于判断各远程文件更新时间中是否存在大于相应的本地文件更新时间的远程文件更新时间;The first judging submodule is used to judge whether there is a remote file update time greater than the corresponding local file update time in each remote file update time;

目标文件确定子模块,用于当确定各远程文件更新时间中存在大于相应的本地文件更新时间的远程文件更新时间时,将大于相应的本地文件更新时间的远程文件更新时间对应的远程静态资源文件确定为目标远程静态资源文件;The target file determination sub-module is used to determine the remote static resource file corresponding to the remote file update time greater than the corresponding local file update time when it is determined that there is a remote file update time greater than the corresponding local file update time in each remote file update time Determined as the target remote static resource file;

文件替换子模块,用于利用JSch框架从前端远程服务器中拉取目标远程静态资源文件,以利用目标远程静态资源文件替换后端本地预设目录中相应的静态资源文件。The file replacement submodule is used to use the JSch framework to pull the target remote static resource file from the front-end remote server, so as to replace the corresponding static resource file in the back-end local preset directory with the target remote static resource file.

在本发明的一种具体实施方式中,文件更新模块还包括:In a specific embodiment of the present invention, the file update module also includes:

文件名遍历子模块,用于在利用目标远程静态资源文件替换后端本地预设目录中相应的静态资源文件之后,遍历后端本地预设目录中各静态资源文件分别对应的全路径文件名;The file name traversal sub-module is used to traverse the full path file names corresponding to each static resource file in the back-end local preset directory after replacing the corresponding static resource file in the back-end local preset directory with the target remote static resource file;

第二判断子模块,用于判断各全路径文件名是否均存在于全路径文件名列表中;其中,全路径文件名列表为根据后端本地预设目录中的各静态资源文件的存活状态生成的列表;The second judging submodule is used to judge whether each full-path file name exists in the full-path file name list; wherein, the full-path file name list is generated according to the survival status of each static resource file in the back-end local preset directory list of;

文件删除子模块,用于当确定各全路径文件名未均存在于全路径文件名列表中时,将后端本地预设目录中未存在于全路径文件名列表的全路径文件名对应的静态资源文件删除。The file deletion sub-module is used to delete the static files corresponding to the full-path file names in the back-end local preset directory that do not exist in the full-path file name list when it is determined that each full-path file name does not exist in the full-path file name list. Resource files are deleted.

相应于上面的方法实施例,参见图4,图4为本发明所提供的Web页面请求的响应设备的示意图,该设备可以包括:Corresponding to the above method embodiment, referring to FIG. 4, FIG. 4 is a schematic diagram of a response device for a Web page request provided by the present invention, and the device may include:

存储器41,用于存储计算机程序;Memory 41, used to store computer programs;

处理器42,用于执行上述存储器41存储的计算机程序时可实现如下步骤:When the processor 42 is used to execute the computer program stored in the memory 41, the following steps can be realized:

接收前端远程服务器发送的Web页面请求;对Web页面请求进行解析,得到待获取的目标静态资源文件;利用Spring Boot框架从后端本地预设目录中获取目标静态资源文件,并利用目标静态资源文件进行服务运行环境搭建,以对Web页面请求进行响应;其中,后端本地预设目录中的各静态资源文件为通过JSch框架从前端远程服务器中拉取得到。Receive the web page request sent by the front-end remote server; parse the web page request to obtain the target static resource file; use the Spring Boot framework to obtain the target static resource file from the back-end local preset directory, and use the target static resource file Build a service running environment to respond to web page requests; among them, each static resource file in the back-end local preset directory is pulled from the front-end remote server through the JSch framework.

对于本发明提供的设备的介绍请参照上述方法实施例,本发明在此不做赘述。For the introduction of the device provided by the present invention, please refer to the above method embodiment, and the present invention will not repeat it here.

相应于上面的方法实施例,本发明还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时可实现如下步骤:Corresponding to the above method embodiments, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps can be implemented:

接收前端远程服务器发送的Web页面请求;对Web页面请求进行解析,得到待获取的目标静态资源文件;利用Spring Boot框架从后端本地预设目录中获取目标静态资源文件,并利用目标静态资源文件进行服务运行环境搭建,以对Web页面请求进行响应;其中,后端本地预设目录中的各静态资源文件为通过JSch框架从前端远程服务器中拉取得到。Receive the web page request sent by the front-end remote server; parse the web page request to obtain the target static resource file; use the Spring Boot framework to obtain the target static resource file from the back-end local preset directory, and use the target static resource file Build a service running environment to respond to web page requests; among them, each static resource file in the back-end local preset directory is pulled from the front-end remote server through the JSch framework.

该计算机可读存储介质可以包括:U盘、移动硬盘、只读存储器(Read-OnlyMemory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The computer-readable storage medium may include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc., which can store program codes. medium.

对于本发明提供的计算机可读存储介质的介绍请参照上述方法实施例,本发明在此不做赘述。For the introduction of the computer-readable storage medium provided by the present invention, please refer to the foregoing method embodiments, and the present invention will not repeat them here.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置、设备及计算机可读存储介质而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same or similar parts of each embodiment can be referred to each other. As for the device, equipment and computer-readable storage medium disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and for relevant details, please refer to the description of the method part.

本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的技术方案及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。In this paper, specific examples are used to illustrate the principles and implementation methods of the present invention, and the descriptions of the above embodiments are only used to help understand the technical solutions and core ideas of the present invention. It should be pointed out that for those skilled in the art, without departing from the principle of the present invention, some improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

Claims (6)

1.一种Web页面请求的响应方法,其特征在于,应用于后端本地服务器,包括:1. A method for responding to a Web page request, characterized in that it is applied to a backend local server, comprising: 接收前端远程服务器发送的Web页面请求;Receive the web page request sent by the front-end remote server; 对所述Web页面请求进行解析,得到待获取的目标静态资源文件;Analyzing the web page request to obtain the target static resource file to be acquired; 利用Spring Boot框架从后端本地预设目录中获取所述目标静态资源文件,并利用所述目标静态资源文件进行服务运行环境搭建,以对所述Web页面请求进行响应;Using the Spring Boot framework to obtain the target static resource file from the back-end local preset directory, and using the target static resource file to build a service operating environment to respond to the Web page request; 其中,所述后端本地预设目录中的各静态资源文件为通过JSch框架从所述前端远程服务器中拉取得到;Wherein, each static resource file in the local default directory of the backend is obtained by pulling from the front-end remote server through the JSch framework; 遍历所述后端本地预设目录中各所述静态资源文件分别对应的全路径文件名;Traversing the full path file names corresponding to each of the static resource files in the back-end local preset directory; 判断各所述全路径文件名是否均存在于全路径文件名列表中;其中,所述全路径文件名列表为根据所述后端本地预设目录中的各所述静态资源文件的存活状态生成的列表;Judging whether each of the full-path file names exists in the full-path file name list; wherein, the full-path file name list is generated according to the survival status of each of the static resource files in the back-end local preset directory list of; 若否,则将所述后端本地预设目录中未存在于所述全路径文件名列表的全路径文件名对应的静态资源文件删除;If not, then delete the static resource files corresponding to the full-path file names that do not exist in the full-path file name list in the back-end local preset directory; 分别获取所述前端远程服务器中各所述静态资源文件分别对应的远程文件更新时间,以及所述后端本地预设目录中各所述静态资源文件分别对应的本地文件更新时间;Respectively obtain the remote file update time corresponding to each of the static resource files in the front-end remote server, and the local file update time corresponding to each of the static resource files in the back-end local preset directory; 判断各所述远程文件更新时间中是否存在大于相应的本地文件更新时间的远程文件更新时间;Judging whether there is a remote file update time greater than the corresponding local file update time in each of the remote file update times; 若是,则将大于相应的本地文件更新时间的远程文件更新时间对应的远程静态资源文件确定为目标远程静态资源文件;If so, then determine the remote static resource file corresponding to the remote file update time greater than the corresponding local file update time as the target remote static resource file; 利用所述JSch框架从所述前端远程服务器中拉取所述目标远程静态资源文件,以利用所述目标远程静态资源文件替换所述后端本地预设目录中相应的静态资源文件。Using the JSch framework to pull the target remote static resource file from the front-end remote server to replace the corresponding static resource file in the back-end local preset directory with the target remote static resource file. 2.根据权利要求1所述的Web页面请求的响应方法,其特征在于,在利用Spring Boot框架从后端本地预设目录中获取所述目标静态资源之后,还包括:2. the response method of Web page request according to claim 1, is characterized in that, after utilizing Spring Boot framework to obtain described target static resource from back-end local preset directory, also comprises: 利用Nginx反向代理服务器反向代理所述Spring Boot框架。Use the Nginx reverse proxy server to reverse proxy the Spring Boot framework. 3.一种Web页面请求的响应装置,其特征在于,应用于后端本地服务器,包括:3. A response device for a Web page request, characterized in that it is applied to a backend local server, comprising: 请求接收模块,用于接收前端远程服务器发送的Web页面请求;The request receiving module is used to receive the Web page request sent by the front-end remote server; 请求解析模块,用于对所述Web页面请求进行解析,得到待获取的目标静态资源文件;A request parsing module, configured to parse the web page request to obtain the target static resource file to be acquired; 请求响应模块,用于利用Spring Boot框架从后端本地预设目录中获取所述目标静态资源文件,并利用所述目标静态资源文件进行服务运行环境搭建,以对所述Web页面请求进行响应;The request response module is used to obtain the target static resource file from the back-end local preset directory by using the Spring Boot framework, and use the target static resource file to build a service operating environment to respond to the Web page request; 其中,所述后端本地预设目录中的各静态资源文件为通过JSch框架从所述前端远程服务器中拉取得到;Wherein, each static resource file in the local default directory of the backend is obtained by pulling from the front-end remote server through the JSch framework; 文件更新模块,所述文件更新模块包括:A file update module, the file update module includes: 文件名遍历子模块,用于遍历后端本地预设目录中各静态资源文件分别对应的全路径文件名;The file name traversal sub-module is used to traverse the full path file names corresponding to each static resource file in the backend local preset directory; 第二判断子模块,用于判断各全路径文件名是否均存在于全路径文件名列表中;其中,全路径文件名列表为根据后端本地预设目录中的各静态资源文件的存活状态生成的列表;The second judging submodule is used to judge whether each full-path file name exists in the full-path file name list; wherein, the full-path file name list is generated according to the survival status of each static resource file in the back-end local preset directory list of; 文件删除子模块,用于当确定各全路径文件名未均存在于全路径文件名列表中时,将后端本地预设目录中未存在于全路径文件名列表的全路径文件名对应的静态资源文件删除;The file deletion sub-module is used to delete the static files corresponding to the full-path file names in the back-end local preset directory that do not exist in the full-path file name list when it is determined that each full-path file name does not exist in the full-path file name list. Resource file deletion; 文件更新模块,所述文件更新模块包括更新时间获取子模块、第一判断子模块、目标文件确定子模块以及文件替换子模块,所述更新时间获取子模块,用于分别获取所述前端远程服务器中各所述静态资源文件分别对应的远程文件更新时间,以及所述后端本地预设目录中各所述静态资源文件分别对应的本地文件更新时间;A file update module, the file update module includes an update time acquisition submodule, a first judgment submodule, a target file determination submodule and a file replacement submodule, and the update time acquisition submodule is used to acquire the front-end remote server respectively The remote file update time corresponding to each of the static resource files in , and the local file update time corresponding to each of the static resource files in the back-end local preset directory; 所述第一判断子模块,用于判断各所述远程文件更新时间中是否存在大于相应的本地文件更新时间的远程文件更新时间;The first judgment submodule is used to judge whether there is a remote file update time greater than the corresponding local file update time in each of the remote file update times; 所述目标文件确定子模块,用于当确定各所述远程文件更新时间中存在大于相应的本地文件更新时间的远程文件更新时间时,将大于相应的本地文件更新时间的远程文件更新时间对应的远程静态资源文件确定为目标远程静态资源文件;The target file determination submodule is configured to determine the remote file update time corresponding to the remote file update time greater than the corresponding local file update time when it is determined that there is a remote file update time greater than the corresponding local file update time in each of the remote file update times. The remote static resource file is determined as the target remote static resource file; 所述文件替换子模块,用于利用所述JSch框架从所述前端远程服务器中拉取所述目标远程静态资源文件,以利用所述目标远程静态资源文件替换所述后端本地预设目录中相应的静态资源文件。The file replacement submodule is used to use the JSch framework to pull the target remote static resource file from the front-end remote server to replace the back-end local preset directory with the target remote static resource file Corresponding static resource files. 4.根据权利要求3所述的Web页面请求的响应装置,其特征在于,还包括:4. the response device of Web page request according to claim 3, is characterized in that, also comprises: 反向代理模块,用于在利用Spring Boot框架从后端本地预设目录中获取所述目标静态资源之后,利用Nginx反向代理服务器反向代理所述Spring Boot框架。The reverse proxy module is used to use the Nginx reverse proxy server to reverse proxy the Spring Boot framework after using the Spring Boot framework to obtain the target static resource from the backend local preset directory. 5.一种Web页面请求的响应设备,其特征在于,包括:5. A response device for a Web page request, comprising: 存储器,用于存储计算机程序;memory for storing computer programs; 处理器,用于执行所述计算机程序时实现如权利要求1至2任一项所述Web页面请求的响应方法的步骤。A processor, configured to implement the steps of the method for responding to a Web page request according to any one of claims 1 to 2 when executing the computer program. 6.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至2任一项所述Web页面请求的响应方法的步骤。6. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the Web page as described in any one of claims 1 to 2 is realized. The steps of the response method for the request.
CN202011453168.XA 2020-12-11 2020-12-11 Response method, device, equipment and storage medium for Web page request Active CN112487339B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011453168.XA CN112487339B (en) 2020-12-11 2020-12-11 Response method, device, equipment and storage medium for Web page request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011453168.XA CN112487339B (en) 2020-12-11 2020-12-11 Response method, device, equipment and storage medium for Web page request

Publications (2)

Publication Number Publication Date
CN112487339A CN112487339A (en) 2021-03-12
CN112487339B true CN112487339B (en) 2023-05-26

Family

ID=74916696

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011453168.XA Active CN112487339B (en) 2020-12-11 2020-12-11 Response method, device, equipment and storage medium for Web page request

Country Status (1)

Country Link
CN (1) CN112487339B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113312577B (en) * 2021-06-01 2024-06-25 平安证券股份有限公司 Webpage resource processing method and device, electronic equipment and storage medium
CN116647546A (en) * 2023-06-07 2023-08-25 政采云有限公司 Flutter_web running method, device, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107992557A (en) * 2017-11-28 2018-05-04 平安养老保险股份有限公司 Static resource update method, device, storage medium and computer equipment
CN108959455A (en) * 2018-06-15 2018-12-07 上海陆家嘴国际金融资产交易市场股份有限公司 Single page Web application implementation method, device, computer equipment and storage medium
US10666708B1 (en) * 2018-02-21 2020-05-26 Facebook, Inc. Systems and methods for updating web pages using static resource version pinning

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2390348A1 (en) * 2002-06-10 2003-12-10 Ibm Canada Limited-Ibm Canada Limitee Systems, methods and computer programs for implementing and accessing webservices
CN105760405A (en) * 2014-12-19 2016-07-13 阿里巴巴集团控股有限公司 Methods and devices for obtaining network resource for loading web page and method and device for caching network resource
CN105516261A (en) * 2015-11-26 2016-04-20 深圳市深信服电子科技有限公司 Web page loading control method and load balancer
CN107992326B (en) * 2017-12-19 2021-03-23 上海新炬网络技术有限公司 Java automation code publishing method based on Struts2 framework
CN110209983B (en) * 2019-05-29 2021-06-04 北京奇艺世纪科技有限公司 Method and device for deploying web project of webpage
CN110263275B (en) * 2019-06-14 2021-10-29 深圳桔子数字技术有限公司 Method and device for accessing webpage, mobile terminal and storage medium
CN111580854A (en) * 2020-03-18 2020-08-25 平安科技(深圳)有限公司 Front-end and back-end separation method based on application program interface gateway and related equipment
CN111798196B (en) * 2020-05-19 2024-11-12 惠州市德赛西威汽车电子股份有限公司 An agile development management system based on SpringBoot framework
CN111783005B (en) * 2020-07-08 2024-03-15 中国工商银行股份有限公司 Method, device and system for displaying web page, computer system and medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107992557A (en) * 2017-11-28 2018-05-04 平安养老保险股份有限公司 Static resource update method, device, storage medium and computer equipment
US10666708B1 (en) * 2018-02-21 2020-05-26 Facebook, Inc. Systems and methods for updating web pages using static resource version pinning
CN108959455A (en) * 2018-06-15 2018-12-07 上海陆家嘴国际金融资产交易市场股份有限公司 Single page Web application implementation method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN112487339A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
US7870482B2 (en) Web browser extension for simplified utilization of web services
CN111787126B (en) Container creation method, server, and storage medium
CN112114805B (en) Page generation method, device and equipment
CN105138561B (en) A kind of darknet space data acquisition method and device
US10831565B2 (en) Fault tolerant adapter system to consume database as a service
EP4055797B1 (en) Web application component migration to a cloud computing system
CN113220273B (en) Micro front-end application resource processing method, device, equipment and medium
CN112487339B (en) Response method, device, equipment and storage medium for Web page request
US9560123B2 (en) Using a same program on a local system and a remote system
WO2023082654A1 (en) Method, apparatus and device for generating service interaction diagram, and storage medium
CN114328152A (en) Log recording method, device, equipment and medium
CN114528510A (en) Webpage data processing method and device, electronic equipment and medium
CN114860240A (en) Low-code page creating method, device, equipment and medium
US20150312314A1 (en) Method and system for application loading
CN115794202A (en) Data configuration method and engine, file system and computer storage medium
CN114637499B (en) Visualization component processing method, device, equipment and medium
CN114489622B (en) Static resource management method, Node.js application, electronic device and storage medium
CN115563423A (en) Data acquisition method and device, computer equipment and storage medium
CN115221437A (en) Font file loading method and device, electronic equipment and storage medium
CN117234467A (en) Unified method, device, equipment and storage medium for flow node interfaces
CN112306324B (en) Information processing method, apparatus, device and medium
CN110599112A (en) Method and device for developing and maintaining network page
JP2004362343A (en) Source code conversion apparatus, source code conversion method, and program
CN115455325A (en) Page rendering method, device, equipment, medium and program product
CN114844957B (en) Link message conversion method, device, equipment, storage medium and program 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
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20210312

Assignee: Hangzhou Anheng Information Security Technology Co.,Ltd.

Assignor: Dbappsecurity Co.,Ltd.

Contract record no.: X2024980043364

Denomination of invention: A method, apparatus, device, and storage medium for responding to web page requests

Granted publication date: 20230526

License type: Common License

Record date: 20241231

EE01 Entry into force of recordation of patent licensing contract