CN109815430B - Request processing method and device, data processing server and readable storage medium - Google Patents

Request processing method and device, data processing server and readable storage medium Download PDF

Info

Publication number
CN109815430B
CN109815430B CN201811453799.4A CN201811453799A CN109815430B CN 109815430 B CN109815430 B CN 109815430B CN 201811453799 A CN201811453799 A CN 201811453799A CN 109815430 B CN109815430 B CN 109815430B
Authority
CN
China
Prior art keywords
page
web system
request
access request
data
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
CN201811453799.4A
Other languages
Chinese (zh)
Other versions
CN109815430A (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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology 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 Beijing Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201811453799.4A priority Critical patent/CN109815430B/en
Publication of CN109815430A publication Critical patent/CN109815430A/en
Application granted granted Critical
Publication of CN109815430B publication Critical patent/CN109815430B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention provides a request processing method, a request processing device, a data processing server and a readable storage medium, wherein the request processing method is applied to the data processing server and comprises the following steps: judging whether the page access request is an access request for accessing a specified page or not; the designated page is a page with front and back ends separated and capable of providing access service for the web system; if the page access request is an access request for accessing a specified page, feeding back the requested data to the front end of the web system with the front end and the back end separated, otherwise, sending the page access request to the back end of the web system with the front end and the back end coupled. The web system with the separated front end and the web system with the coupled front end and the coupled back end provide services at the same time, and the condition that page access services cannot be provided for users is reduced.

Description

Request processing method and device, data processing server and readable storage medium
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a request processing method and apparatus, a data processing server, and a readable storage medium.
Background
There are a large number of front-end and back-end coupled web systems in traditional internet applications. With the rapid development of internet technology, a web system with separated front and back ends is present, and is gradually widely adopted in the industry. The web system with separated front and back ends provides a data interface based on RESTful architecture at the back end, and the front end displays a page on the interface, so that the front end and the back end are completely separated, wherein RESTful is a popular data interface architecture conforming to REST (Representational State Transfer) style. Because the front-end program of the web system with the front-end and the back-end separated does not depend on the back-end program strongly, the web system is beneficial to the expansion and maintenance of the program, developers at the front end and the back end can develop the web system independently and parallelly, and the back end can provide general service across terminals.
At present, more and more enterprises and users want to change the original web system developed by adopting a front-end and back-end coupling mode (called front-end and back-end coupled web system for short) into the front-end and back-end separated web system; but in the retrofitting process, the web system, which is mainly coupled by the front end and the back end, responds to the page access request. The method comprises the steps that a front-end and back-end coupled web system is modified into a front-end and back-end separated web system, an existing functional page is modified into a front-end and back-end separated page to adapt to the front-end and back-end separated web system, a new functional page can be generated according to new requirements in the modification process, the newly generated functional page is generally generated based on the front-end and back-end separated web system, and under the condition, the front-end and back-end coupled web system cannot provide access service for the newly generated functional page for a user.
Therefore, in the scheme, in the process of transforming the front-end and back-end coupled web system into the front-end and back-end separated web system, the situation that the page access service cannot be provided for the user occurs.
Disclosure of Invention
Embodiments of the present invention provide a request processing method, an apparatus, a data processing server, and a readable storage medium, so as to reduce a situation that a page access service cannot be provided to a user in a process of modifying a front-end and back-end coupled web system into a front-end and back-end separated web system. The specific technical scheme is as follows:
in a first aspect, to achieve the above object, an embodiment of the present invention provides a request processing method applied to a data processing server, where the method includes:
obtaining a page access request;
judging whether the page access request is an access request for accessing a specified page; the designated page is a page with front and back ends separated and capable of providing access service for the web system;
if the page access request is an access request for accessing the specified page, acquiring data requested by the page access request from pre-stored data; sending the acquired data to the front end of the web system with the front end and the back end separated;
and if the page access request is not the access request for accessing the specified page, sending the page access request to the back end of the web system coupled with the front end and the back end, so that the back end of the web system coupled with the front end and the back end responds to the page access request.
Optionally, the determining whether the page access request is an access request for accessing a specified page includes:
judging whether an access path of a page to be accessed contains a target identifier, wherein the page to be accessed is as follows: the target identification is used for identifying the page of which the front end and the back end are separated and the web system can provide access service;
under the condition that the access path contains the target identifier, judging that the page access request is an access request for accessing a specified page;
and under the condition that the access path does not contain the target identifier, judging that the page access request is not an access request for accessing a specified page.
Optionally, after the sending the acquired data to the front end of the front-end and back-end separated web system, the method further includes:
obtaining a data request aiming at data to be displayed in the page to be accessed;
sending the data request to the back end of the front-end and back-end separated web system, so that the back end of the front-end and back-end separated web system responds to the data request;
or after the sending the page access request to the backend of the front-end and back-end coupled web system, the method further includes:
obtaining a data request aiming at data to be displayed in the page to be accessed;
and sending the data request to the back end of the front-end and back-end coupled web system so that the back end of the front-end and back-end coupled web system responds to the data request.
Optionally, obtaining the page access request includes:
and acquiring a page access request which is sent by the front end of the web system with the coupled front end and the coupled back end or the front end of the web system with the separated front end and the back end in an asynchronous request mode.
Optionally, a front end of the front-end and a back end of the front-end and back-end separated web system and a back end of the front-end and back-end coupled web system both store a page access path set, where the page access path set includes: the access path of the specified page and the access path of the page which is not subjected to front-end and back-end separation transformation are determined;
the page access request is: and the front end of the web system with the front end and the back end separated or the back end of the web system with the front end and the back end coupled generates a request according to the access path in the page access path set.
In a second aspect, to achieve the above object, an embodiment of the present invention further provides a request processing apparatus applied to a data processing server, where the apparatus includes:
the first obtaining module is used for obtaining a page access request;
the judging module is used for judging whether the page access request is an access request for accessing a specified page; the designated page is a page with front and back ends separated and capable of providing access service for the web system;
the first sending module is used for acquiring data requested by the page access request from the pre-stored data under the condition that the judgment result of the judging module is yes; sending the acquired data to the front end of a web system with a front end and a back end separated;
and the second sending module is used for sending the page access request to the back end of the front-end and back-end coupled web system under the condition that the judgment result of the judging module is negative, so that the back end of the front-end and back-end coupled web system responds to the page access request.
Optionally, the determining module is specifically configured to:
judging whether an access path of a page to be accessed contains a target identifier, wherein the page to be accessed is as follows: the target identification is used for identifying the page of which the front end and the back end are separated and the web system can provide access service;
under the condition that the access path contains the target identifier, judging that the page access request is an access request for accessing a specified page;
and under the condition that the access path does not contain the target identifier, judging that the page access request is not an access request for accessing a specified page.
Optionally, the apparatus further comprises:
the second obtaining module is used for obtaining a data request aiming at data to be displayed in the page to be accessed;
the third sending module is used for sending the data request to the back end of the web system with the front end and the back end separated under the condition that the judgment result of the judging module is yes, so that the back end of the web system with the front end and the back end separated responds to the data request;
and the fourth sending module is used for sending the data request to the back end of the front-end and back-end coupled web system under the condition that the judgment result of the judging module is negative, so that the back end of the front-end and back-end coupled web system responds to the data request.
Optionally, the first obtaining module is configured to:
and acquiring a page access request which is sent by the front end of the web system with the coupled front end and the coupled back end or the front end of the web system with the separated front end and the back end in an asynchronous request mode.
Optionally, a front end of the front-end and a back end of the front-end and back-end separated web system and a back end of the front-end and back-end coupled web system both store a page access path set, where the page access path set includes: the access path of the specified page and the access path of the page which is not subjected to front-end and back-end separation transformation are determined;
the page access request is: and the front end of the web system with the front end and the back end separated or the back end of the web system with the front end and the back end coupled generates a request according to the access path in the page access path set.
In a third aspect, to achieve the above object, an embodiment of the present invention further provides a data processing server, including a processor and a memory, wherein,
a memory for storing a computer program;
and a processor configured to implement the request processing method of the first aspect when executing the program stored in the memory.
In a fourth aspect, to achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the request processing method of the first aspect.
In a fifth aspect, an embodiment of the present invention provides a computer program product containing instructions, which when run on a computer, cause the computer to perform the request processing method of the first aspect.
In a sixth aspect, an embodiment of the present invention provides a computer program, which, when run on a computer, causes the computer to execute the request processing method of the first aspect.
The request processing method, the request processing device, the data processing server and the readable storage medium provided by the embodiment of the invention can judge whether the page access request is an access request for accessing a specified page; the designated page is a page with front and back ends separated and capable of providing access service for the web system; if the page access request is an access request for accessing a specified page, feeding back the requested data to the front end of the web system with the front end and the back end separated, otherwise, sending the page access request to the back end of the web system with the front end and the back end coupled. The web system with the separated front end and the web system with the coupled front end and the coupled back end provide services at the same time, and the condition that page access services cannot be provided for users is reduced. Of course, not all of the above advantages need be achieved in the practice of any one product or method of the present invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a data processing method according to an embodiment of the present invention;
fig. 2 is another schematic flow chart of a data processing method according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a data processing method according to an embodiment of the present invention;
FIG. 4 is an interaction diagram of request processing according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a data processing server according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a request processing method, a request processing device, a data processing server and a computer readable storage medium, and firstly, the request processing method provided by the embodiment of the invention is explained below.
The request processing method provided by the embodiment of the invention can be applied to a data processing server, the data processing server is a server for data processing, illustratively, the data processing server can be a static server, the static server is a server for providing static resource files from a local directory, the static server can be nginx, and nginx is a high-performance HTTP (Hypertext Transfer Protocol) and reverse proxy server.
Fig. 1 is a schematic flow chart of a data processing method according to an embodiment of the present invention, where the method includes:
s101: a page access request is obtained.
The page access request is a request for accessing a page, and may be generated after receiving a request for accessing a page from a user.
S102: judging whether the page access request is an access request for accessing a specified page or not; wherein, the designated page is a page which can provide access service for the web system with front and back ends separated, if yes, S103 is executed, and if no, S104 is executed.
In the process of modifying a front-end and back-end coupled web system into a front-end and back-end separated web system, an existing functional page may be modified into a front-end and back-end separated page (a front-end and back-end separated modified page), or a new functional page (a newly generated functional page) may be generated according to a new requirement. For example, the designated page may be a page whose front and rear ends are separately modified, or may be a newly generated function page.
In the embodiment of the present invention, the page access request may be an access request for accessing a page before the front and back ends are separately modified, or an access request for accessing a newly generated functional page, or an access request for accessing a page after the front and back ends are separately modified. The "access request to access a page before the front and back end separation modification" and the "access request to access a newly generated function page" are collectively referred to as "access requests to access a specified page".
If the page access request is an access request for accessing a specified page, executing S103, namely processing the page access request according to a request processing mode corresponding to the web system with front and back ends separated; if the page access request is not an access request for accessing the specified page, it indicates that the page access request is an access request for accessing a page coupled between the front and back ends, and at this time, S104 may be executed to process the page access request according to a request processing manner corresponding to the web system coupled between the front and back ends.
In the embodiment of the present invention, the page access request may include a page identifier of a page to be accessed, where the page identifier may be a page address, or may also be a preset identifier for distinguishing the page, and the identifier includes at least one of numbers, letters, and characters. As an embodiment, the target identifier may be used to identify a page where the front-end and back-end separated web systems can provide access services, that is, a designated page; in this case, S102 may include: judging whether an access path of a page to be accessed contains a target identifier, wherein the page to be accessed is as follows: the target identification is used for identifying the page of which the front end and the back end are separated and the web system can provide access service; under the condition that the access path contains the target identifier, judging that the page access request is an access request for accessing a specified page; and under the condition that the access path does not contain the target identifier, judging that the page access request is not an access request for accessing a specified page. Of course, there are other ways of determining the state of the device that are not listed here.
S103: acquiring data requested by a page access request from pre-stored data; and sending the acquired data to the front end of the web system with the front end and the back end separated.
The pre-stored data may be stored in the data processing server, may be stored in the database, or may be stored in another server.
After judging that the obtained page access request is an access request for accessing a specified page, the data processing server acquires the requested data from the prestored data and then sends the acquired data to the front end of the web system with the front end and the back end separated; specifically, after judging that the obtained page access request is an access request of a designated page, the data processing server directs the page access request to a directory of front-end engineering deployment, further changes an access address contained in the page access request into a preset alias in an alias mode, determines a path where the front-end engineering directory is located according to the alias, finds the directory of the front-end engineering deployment according to the determined path, then obtains corresponding data from the directory of the front-end engineering deployment, and sends the obtained data to a front end of a web system with front and back ends separated, wherein the alias function is to set an alias of a command to briefly write the command, so that the operation efficiency is improved. The alias way is adopted, so that the path of the directory deployed by the front-end engineering can be arbitrary.
In the embodiment of the present invention, the data requested by the page access request is data required for completing rendering of the accessed page, and specifically may be an HTM L (Hyper Text Mark-up L angle) file, a CSS (Cascading Style Sheets) file, a JSON (JavaScript object notation) format Text data, and the like, which are not described herein again, where the JavaScript is an transliterated script language, and is a dynamic type, a weak type, a prototype-based language, and a built-in support type.
The data processing server obtains data requested by the page access request, then sends the obtained data to the front end of the front-end and back-end separated web system, the front end of the front-end and back-end separated web system judges whether other data need to be obtained according to the received data after receiving the data requested by the page access request sent by the data processing server, if so, the page access request is generated, the generated page access request carries information of the needed data, the generated page access request is sent to the data processing server, and if not, the front end of the front-end and back-end separated web system completes rendering of the accessed page by using the obtained data.
S104: and sending the page access request to the back end of the front-end and back-end coupled web system so that the back end of the front-end and back-end coupled web system responds to the page access request.
If the obtained page access request is not an access request for accessing a specified page, it indicates that the page access request is a request for accessing a page which is not separately modified at the front end and the back end, at this time, the page access request is sent to the back end of the web system coupled at the front end and the back end, the back end of the web system coupled at the front end and the back end responds to the page access request, that is, the back end of the web system coupled at the front end and the back end provides access to the page in a back-end rendering manner, specifically, the back end of the web system coupled at the front end and the back end renders the page to be accessed, sends the rendered page to be accessed to a data processing server, the data processing server transmits the rendered page to be accessed to the front end which sends the page access request, and the front end opens the obtained rendered page to be accessed, that is, the processing.
In the embodiment of the invention, whether the page access request is an access request for accessing a specified page can be judged; the designated page is a page with front and back ends separated and capable of providing access service for the web system; if the page access request is an access request for accessing a specified page, feeding back the requested data to the front end of the web system with the front end and the back end separated, otherwise, sending the page access request to the back end of the web system with the front end and the back end coupled. The web system with the separated front end and the web system with the coupled front end and the coupled back end provide services at the same time, and the condition that page access services cannot be provided for users is reduced.
Fig. 2 is another schematic flow chart of a data processing method according to an embodiment of the present invention, where the method includes:
s201: a page access request is obtained.
S202: judging whether an access path of a page to be accessed contains a target identifier, wherein the page to be accessed is as follows: the page access request requests the page to be accessed, the target identification is used for identifying the page of which the front end and the back end are separated and the web system can provide the access service, if the page contains the target identification, S203 is executed; if the target identification is not included, S204 is performed.
In the embodiment of the present invention, a page that has been separately modified at a front end and a back end and a newly generated functional page, that is, an access path corresponding to the specified page includes a target identifier, and an access path corresponding to a page that has not been separately modified at the front end and the back end does not include a target identifier, if it is determined that the access path of the page to be accessed includes a target identifier, it indicates that the page to be accessed is the specified page, S203 is executed, and if it is determined that the access path of the page to be accessed does not include a target identifier, it indicates that the page to be accessed is a page that has not been separately modified at the front end and the back end, S204 is executed.
In the embodiment of the present invention, the page access request includes an access address of a page to be accessed, where the access address may be a page address, that is, an UR L (Uniform Resource L environment) address, if the page to be accessed is a page whose front and back ends have been separately modified, the target identifier may be a prefix of the access address of the page to be accessed, for example, the page to be accessed is page 1, the access address of the page 1 that has not been separately modified is/admin/adduser.do, and the target identifier is/new/, and the page 1 is separately modified at the front and back ends, and the access address of the modified page 1 is:/new/admin/adduser.do.
S203: acquiring data requested by a page access request from pre-stored data; and sending the acquired data to the front end of the web system with the front end and the back end separated.
S204: and sending the page access request to the back end of the front-end and back-end coupled web system so that the back end of the front-end and back-end coupled web system responds to the page access request.
In an embodiment of the present invention, a front end of a front-end and back-end separated web system and a back end of a front-end and back-end coupled web system each store therein a page access path set, where the page access path set includes: the access path of the specified page and the access path of the page which is not subjected to front-end and back-end separation transformation are as follows: and the front end of the web system with the front end and the back end separated or the back end of the web system with the front end and the back end coupled generates a request according to the access path in the page access path set.
Because the front end of the web system separated from the front end and the back end of the web system coupled with the front end and the back end are both stored with the page access path set, the web system separated from the front end and the back end can provide the access to the page which is separated and reformed from the front end and the back end and the newly generated functional page through the corresponding front end, and also can provide the access to the page which is not separated and reformed from the front end and the back end; similarly, the front-end and back-end coupled web systems can provide access to the page which is subjected to front-end and back-end separation transformation and the newly generated functional page through the corresponding back ends, and also can provide access to the page which is not subjected to front-end and back-end separation transformation, thereby providing a foundation for simultaneous service of the front-end and back-end coupled web systems and the front-end and back-end separated web systems.
When a user requests to access a page, the front end of a web system with separated front and back ends or the back end of the web system with coupled front and back ends determines the access address of the page to be accessed, which is requested to be accessed, of the user after receiving the request of the user, and generates a page access request according to the determined access address, wherein the generated page access request comprises the determined access address. After obtaining the page access request, the data processing server may determine whether the page address included in the page access request includes the target identifier, and then determine a response mode to the page access request according to a determination result. According to the request generated by the access path in the page access path set, the simultaneous service of the web system coupled with the front end and the web system separated from the front end and the back end is guaranteed.
In the embodiment of the invention, the front-end and back-end separated web system and the front-end and back-end coupled web system serve simultaneously, and the front-end of the front-end and back-end separated web system and the back-end of the front-end and back-end coupled web system both store the page access path set, so that the function of switching the pages required for the front-end and back-end separated web system and front-end and back-end coupled web system access can be realized in an imperceptible way, namely, the front-end and back-end separation and reconstruction of the pages by a user is imperceptible, because the front-end and back-end separated web system and the front-end and back-end coupled web system provide access of all the pages, the front-end and back-end separation and reconstruction of the pages can not generate any influence on the access of the user, and the user can see whether the pages are the pages after separation and reconstruction from the.
In the embodiment of the invention, whether the page access request is an access request for accessing a specified page can be judged; the designated page is a page with front and back ends separated and capable of providing access service for the web system; if the page access request is an access request for accessing a specified page, feeding back the requested data to the front end of the web system with the front end and the back end separated, otherwise, sending the page access request to the back end of the web system with the front end and the back end coupled. The web system with the separated front end and the web system with the coupled front end and the coupled back end provide services at the same time, and the condition that page access services cannot be provided for users is reduced.
Fig. 3 is a schematic flowchart of another data processing method according to an embodiment of the present invention, where the method includes:
s301: a page access request is obtained.
S302: judging whether an access path of a page to be accessed contains a target identifier, wherein the page to be accessed is as follows: the page access request requests the page to be accessed, the target identification is used for identifying the page of which the front end and the back end are separated and the web system can provide the access service, if the page contains the target identification, S303 is executed; if the target identification is not included, S304 is performed.
S303: acquiring data requested by a page access request from pre-stored data; and sending the acquired data to the front end of the web system with the front end and the back end separated.
S304: and sending the page access request to the back end of the front-end and back-end coupled web system so that the back end of the front-end and back-end coupled web system responds to the page access request.
After S303, S305A may be continuously executed, and after S304, S305B, S305A and S305B may be continuously executed, where: and obtaining a data request aiming at the data to be displayed in the page to be accessed.
The data request may be sent by the front end of a web system with coupled front and back ends, or sent by the front end of a web system with separated front and back ends, and the data request may be an acquisition request for data to be displayed in a page to be accessed. A data request may be understood as a request that is generated while the user continues with other operations on the page.
For example, assuming that the page is a shopping page, after the shopping page is presented to the user in response to a page access request, the user clicks a "comment" option in the shopping page, and in this case, it may be considered that a data request is obtained, where the data request is to request "comment" data in the "comment" option.
After S305A, S306 may be performed: and sending the data request to the back end of the web system with the front end and the back end separated so that the back end of the web system with the front end and the back end separated responds to the data request.
The data processing server sends a data request to the back end of a web system with separated front and back ends when judging that the page to be accessed is a designated page, the back end of the web system with separated front and back ends responds to the data request after receiving the data request, specifically, data corresponding to the data request is obtained, then, the obtained data is sent to the data processing server, and the data processing server forwards the data to the front end sending the data request.
After S305B, S307 may be executed: the data request is sent to a back end of the front-end and back-end coupled web systems so that the back end of the front-end and back-end coupled web systems responds to the data request.
The data processing server sends a data request to the back end of a web system coupled with the front end and the back end under the condition that the page to be accessed is judged to be a page which is not subjected to front-end and back-end separation transformation, the back end of the web system coupled with the front end and the back end responds to the data request after receiving the data request, specifically, data corresponding to the data request is obtained, then the obtained data is sent to the data processing server, and the data processing server forwards the data to the front end sending the data request.
The data request initiated by the front end of the web system with the front and back ends separated or the front end of the web system with the front and back ends coupled is forwarded to the corresponding data interface of the back end through the data processing server, the data interface of the back end can be a Restful data interface, the Restful is a software architecture style, the design style is not a standard, and only a set of design principles and constraint conditions are provided. The method is mainly used for the interactive software of the client and the server. Software designed based on the style can be simpler, more hierarchical and easier to realize mechanisms such as cache and the like.
In the embodiment of the invention, after the page access request is obtained, under the condition that the access address of the page to be accessed contains the target identification, the requested data is fed back to the front end of the web system with the front end and the back end separated, and if the page access request does not contain the target identification, the page access request is sent to the back end of the web system with the front end and the back end coupled. After the data request is obtained, under the condition that the page to be accessed is judged to be the designated page, the back end of the web system with the front end and the back end separated responds to the data request, otherwise, the back end of the web system with the front end and the back end coupled responds to the data request, and the web system with the front end and the back end separated and the web system with the front end and the back end coupled provide services at the same time. The web system with the separated front end and the web system with the coupled front end and the coupled back end provide services at the same time, and the condition that page access services cannot be provided for users is reduced.
In one embodiment of the present invention, obtaining a page access request comprises:
and acquiring a page access request which is sent by the front end of the web system with the coupled front end and the coupled back end or the front end of the web system with the separated front end and the back end in an asynchronous request mode.
The Asynchronous request can be an Ajax (Asynchronous JavaScript and Xml ) Asynchronous request which is an Asynchronous request for waiting for a response of a data processing server after sending a page access request, wherein Ajax is a client-side script language which is based on object and event driving and has relative safety and is widely used for client-side web development, and can update the art of partial web pages without reloading the whole page, XM L (Extensible Markup language L) is a standard for internationally defining the structure and content description of an electronic file, is a very complex document structure, is mainly used for a defense area of a large amount of highly structured data and other various industrial fields, is convenient for classifying and classifying various industrial fields, and can be used for a user to execute a webpage interaction between the Internet and the web page, and can be cancelled by using a web page editing and a web page, so that the requirement of the interaction between the front end of a web system coupled with the front end and the front end of the web system is not required by a user, and the front end of the web system separated from the front end and the front end of the web system, and the front end of the web system coupled with the web system, and the front end of the web system can send another page access request.
The data processing server obtains the page access request sent in an asynchronous request mode, can process a plurality of page access requests in parallel, and improves the capacity of the data processing request server for processing the page access requests.
In the embodiment of the present invention, the front end of the front-end and back-end separated web system and the front end of the front-end and back-end coupled web system may be located on the same physical machine, and the back end of the front-end and back-end separated web system and the back end of the front-end and back-end coupled web system may be the same back end, in this case, the interaction of request processing provided by the embodiment of the present invention is as shown in fig. 4, when receiving data corresponding to the page access request with/new/prefix, the data processing server feeds back the data corresponding to the page access request with/new/prefix to the front end, and sends the data request with/data/prefix and the request without prefix to the back end to be responded by the back end to the requests, where the request without prefix includes the page access request without/new/; and after the back end responds, the response result is sent to the front end through the data processing server.
Fig. 5 is a schematic structural diagram of a request processing apparatus according to an embodiment of the present invention, where the data processing apparatus is applied to a data processing server, and the data processing apparatus includes:
a first obtaining module 501, configured to obtain a page access request;
a determining module 502, configured to determine whether the page access request is an access request for accessing a specified page; the designated page is a page with front and back ends separated and capable of providing access service for the web system;
a first sending module 503, configured to, if the determination result of the determining module 502 is yes, obtain data requested by the page access request from pre-stored data; sending the acquired data to the front end of a web system with a front end and a back end separated;
a second sending module 504, configured to send the page access request to the back end of the front-end and back-end coupled web systems if the determination result of the determining module 502 is negative, so that the back end of the front-end and back-end coupled web systems responds to the page access request.
In the embodiment of the invention, whether the page access request is an access request for accessing a specified page is judged; the designated page is a page with front and back ends separated and capable of providing access service for the web system; if the page access request is an access request for accessing a specified page, feeding back the requested data to the front end of the web system with the front end and the back end separated, otherwise, sending the page access request to the back end of the web system with the front end and the back end coupled. The web system with the separated front end and the web system with the coupled front end and the coupled back end provide services at the same time, and the condition that page access services cannot be provided for users is reduced.
In an embodiment of the present invention, the determining module 502 is configured to:
judging whether an access path of a page to be accessed contains a target identifier, wherein the page to be accessed is as follows: the target identification is used for identifying the page of which the front end and the back end are separated and the web system can provide access service;
under the condition that the access path contains the target identifier, judging that the page access request is an access request for accessing a specified page;
and under the condition that the access path does not contain the target identifier, judging that the page access request is not an access request for accessing a specified page.
In one embodiment of the present invention, the apparatus may further include:
the second obtaining module is used for obtaining a data request aiming at data to be displayed in the page to be accessed;
a third sending module, configured to send the data request to the back end of the web system with separate front and back ends if the determination result of the determining module 502 is yes, so that the back end of the web system with separate front and back ends responds to the data request;
a fourth sending module, configured to send the data request to the back end of the front-end and back-end coupled web systems if the determination result of the determining module 502 is negative, so that the back end of the front-end and back-end coupled web systems responds to the data request.
In an embodiment of the present invention, the first obtaining module 501 is configured to:
and acquiring a page access request which is sent by the front end of the web system with the coupled front end and the coupled back end or the front end of the web system with the separated front end and the back end in an asynchronous request mode.
In an embodiment of the present invention, a front end of a front-end and back-end separated web system and a back end of a front-end and back-end coupled web system each store therein a page access path set, where the page access path set includes: the access path of the specified page and the access path of the page which is not subjected to front-end and back-end separation transformation are determined;
the page access request is: and the front end of the web system with the front end and the back end separated or the back end of the web system with the front end and the back end coupled generates a request according to the access path in the page access path set.
An embodiment of the present invention further provides a data processing server, as shown in fig. 6, including a processor 601 and a memory 602;
a memory 602 for storing a computer program;
when the processor 601 is configured to execute the program stored in the memory 602, to implement the request processing method according to any one of the above embodiments, optionally, the following steps may be implemented:
obtaining a page access request;
judging whether the page access request is an access request for accessing a specified page; the designated page is a page with front and back ends separated and capable of providing access service for the web system;
if the page access request is an access request for accessing the specified page, acquiring data requested by the page access request from pre-stored data; sending the acquired data to the front end of the web system with the front end and the back end separated;
and if the page access request is not the access request for accessing the specified page, sending the page access request to the back end of the web system coupled with the front end and the back end, so that the back end of the web system coupled with the front end and the back end responds to the page access request.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In the embodiment of the invention, whether the page access request is an access request for accessing a specified page is judged; the designated page is a page with front and back ends separated and capable of providing access service for the web system; if the page access request is an access request for accessing a specified page, feeding back the requested data to the front end of the web system with the front end and the back end separated, otherwise, sending the page access request to the back end of the web system with the front end and the back end coupled. The web system with the separated front end and the web system with the coupled front end and the coupled back end provide services at the same time, and the condition that page access services cannot be provided for users is reduced.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program is executed by a processor to implement the request processing method in any one of the above embodiments.
In the embodiment of the invention, whether the page access request is an access request for accessing a specified page is judged; the designated page is a page with front and back ends separated and capable of providing access service for the web system; if the page access request is an access request for accessing a specified page, feeding back the requested data to the front end of the web system with the front end and the back end separated, otherwise, sending the page access request to the back end of the web system with the front end and the back end coupled. The web system with the separated front end and the web system with the coupled front end and the coupled back end provide services at the same time, and the condition that page access services cannot be provided for users is reduced.
In a further embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the request processing method of any of the above embodiments.
In the embodiment of the invention, whether the page access request is an access request for accessing a specified page is judged; the designated page is a page with front and back ends separated and capable of providing access service for the web system; if the page access request is an access request for accessing a specified page, feeding back the requested data to the front end of the web system with the front end and the back end separated, otherwise, sending the page access request to the back end of the web system with the front end and the back end coupled. The web system with the separated front end and the web system with the coupled front end and the coupled back end provide services at the same time, and the condition that page access services cannot be provided for users is reduced.
In a further embodiment of the present invention, there is also provided a computer program which, when run on a computer, causes the computer to execute the request processing method of any one of the above embodiments.
In the embodiment of the invention, whether the page access request is an access request for accessing a specified page is judged; the designated page is a page with front and back ends separated and capable of providing access service for the web system; if the page access request is an access request for accessing a specified page, feeding back the requested data to the front end of the web system with the front end and the back end separated, otherwise, sending the page access request to the back end of the web system with the front end and the back end coupled. The web system with the separated front end and the web system with the coupled front end and the coupled back end provide services at the same time, and the condition that page access services cannot be provided for users is reduced.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the request processing device/data processing server/computer readable storage medium embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (12)

1. A request processing method applied to a data processing server, the method comprising:
obtaining a page access request;
judging whether the page access request is an access request for accessing a specified page; the designated page is a page with front and back ends separated and capable of providing access service for the web system;
if the page access request is an access request for accessing the specified page, acquiring data requested by the page access request from pre-stored data; sending the acquired data to the front end of the web system with the front end and the back end separated;
and if the page access request is not the access request for accessing the specified page, sending the page access request to the back end of the web system coupled with the front end and the back end, so that the back end of the web system coupled with the front end and the back end responds to the page access request.
2. The method of claim 1, wherein the determining whether the page access request is an access request for accessing a specific page comprises:
judging whether an access path of a page to be accessed contains a target identifier, wherein the page to be accessed is as follows: the target identification is used for identifying the page of which the front end and the back end are separated and the web system can provide access service;
under the condition that the access path contains the target identifier, judging that the page access request is an access request for accessing a specified page;
and under the condition that the access path does not contain the target identifier, judging that the page access request is not an access request for accessing a specified page.
3. The method of claim 2, wherein after the sending the obtained data to the front end of the front-end separated web system, the method further comprises:
obtaining a data request aiming at data to be displayed in the page to be accessed;
sending the data request to the back end of the front-end and back-end separated web system, so that the back end of the front-end and back-end separated web system responds to the data request;
or after the sending the page access request to the backend of the front-end and back-end coupled web system, the method further includes:
obtaining a data request aiming at data to be displayed in the page to be accessed;
and sending the data request to the back end of the front-end and back-end coupled web system so that the back end of the front-end and back-end coupled web system responds to the data request.
4. The method of any of claims 1-3, wherein obtaining a page access request comprises:
and acquiring the page access request sent by the front end of the web system coupled with the front end and the back end or the front end of the web system separated from the front end and the back end in an asynchronous request mode.
5. The method according to any one of claims 1 to 3,
a page access path set is stored in both the front end of the front-end and back-end separated web system and the back end of the front-end and back-end coupled web system, wherein the page access path set comprises: the access path of the specified page and the access path of the page which is not subjected to front-end and back-end separation transformation are determined;
the page access request is as follows: and the front end of the web system with the front and back ends separated or the back end of the web system with the front and back ends coupled generates a request according to the access path in the page access path set.
6. A request processing apparatus, applied to a data processing server, the apparatus comprising:
the first obtaining module is used for obtaining a page access request;
the judging module is used for judging whether the page access request is an access request for accessing a specified page; the designated page is a page with front and back ends separated and capable of providing access service for the web system;
the first sending module is used for acquiring the data requested by the page access request from the pre-stored data under the condition that the judgment result of the judging module is yes; sending the acquired data to the front end of a web system with a front end and a back end separated;
and the second sending module is used for sending the page access request to the back end of the front-end and back-end coupled web system under the condition that the judgment result of the judging module is negative, so that the back end of the front-end and back-end coupled web system responds to the page access request.
7. The apparatus of claim 6, wherein the determining module is configured to:
judging whether an access path of a page to be accessed contains a target identifier, wherein the page to be accessed is as follows: the target identification is used for identifying the page of which the front end and the back end are separated and the web system can provide access service;
under the condition that the access path contains the target identifier, judging that the page access request is an access request for accessing a specified page;
and under the condition that the access path does not contain the target identifier, judging that the page access request is not an access request for accessing a specified page.
8. The apparatus of claim 7, further comprising:
the second obtaining module is used for obtaining a data request aiming at the data to be displayed in the page to be accessed;
a third sending module, configured to send the data request to the back end of the front-end and back-end separated web systems if the determination result of the determining module is yes, so that the back end of the front-end and back-end separated web systems responds to the data request;
and a fourth sending module, configured to send the data request to the back end of the front-end and back-end coupled web systems if the determination result of the determining module is negative, so that the back end of the front-end and back-end coupled web systems responds to the data request.
9. The apparatus according to any one of claims 6-8, wherein the first obtaining module is configured to:
and acquiring the page access request sent by the front end of the web system coupled with the front end and the back end or the front end of the web system separated from the front end and the back end in an asynchronous request mode.
10. The apparatus according to any one of claims 6-8,
a page access path set is stored in both the front end of the front-end and back-end separated web system and the back end of the front-end and back-end coupled web system, wherein the page access path set comprises: the access path of the specified page and the access path of the page which is not subjected to front-end and back-end separation transformation are determined;
the page access request is as follows: and the front end of the web system with the front and back ends separated or the back end of the web system with the front and back ends coupled generates a request according to the access path in the page access path set.
11. A data processing server is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
12. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-5.
CN201811453799.4A 2018-11-30 2018-11-30 Request processing method and device, data processing server and readable storage medium Active CN109815430B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811453799.4A CN109815430B (en) 2018-11-30 2018-11-30 Request processing method and device, data processing server and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811453799.4A CN109815430B (en) 2018-11-30 2018-11-30 Request processing method and device, data processing server and readable storage medium

Publications (2)

Publication Number Publication Date
CN109815430A CN109815430A (en) 2019-05-28
CN109815430B true CN109815430B (en) 2020-07-31

Family

ID=66601906

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811453799.4A Active CN109815430B (en) 2018-11-30 2018-11-30 Request processing method and device, data processing server and readable storage medium

Country Status (1)

Country Link
CN (1) CN109815430B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110399157B (en) * 2019-07-05 2022-09-20 苏州浪潮智能科技有限公司 Method and development machine for developing Ambari tool page
CN111752559B (en) * 2019-11-07 2024-02-06 北京沃东天骏信息技术有限公司 Front-end and back-end separation system, method, device and storage medium
CN111343270B (en) * 2020-02-26 2022-08-23 浪潮通用软件有限公司 Screen control method and system, cloud server and controller
CN113839974A (en) * 2020-06-23 2021-12-24 海尔数字科技(上海)有限公司 Container platform charging method and system
CN112463404A (en) * 2020-11-13 2021-03-09 贝壳技术有限公司 Page request processing method and device, electronic equipment and storage medium
CN112528274B (en) * 2020-12-24 2023-09-22 微医云(杭州)控股有限公司 Data processing method, device, electronic equipment and storage medium
CN113407993A (en) * 2021-06-18 2021-09-17 杭州安恒信息技术股份有限公司 Page permission control method and related device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106227742A (en) * 2016-07-12 2016-12-14 乐视控股(北京)有限公司 Dynamic web page based on B/S pattern generates method, server and system
CN106227763A (en) * 2016-07-13 2016-12-14 珠海市魅族科技有限公司 The method and device that a kind of webpage loads
CN107862044A (en) * 2017-11-07 2018-03-30 北京京东尚科信息技术有限公司 The method and apparatus of displayed page
GB2560449A (en) * 2010-08-24 2018-09-12 Qando Service Inc Accessing a web site
CN108536805A (en) * 2018-04-04 2018-09-14 平安科技(深圳)有限公司 web access method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9208032B1 (en) * 2013-05-15 2015-12-08 Amazon Technologies, Inc. Managing contingency capacity of pooled resources in multiple availability zones

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2560449A (en) * 2010-08-24 2018-09-12 Qando Service Inc Accessing a web site
CN106227742A (en) * 2016-07-12 2016-12-14 乐视控股(北京)有限公司 Dynamic web page based on B/S pattern generates method, server and system
CN106227763A (en) * 2016-07-13 2016-12-14 珠海市魅族科技有限公司 The method and device that a kind of webpage loads
CN107862044A (en) * 2017-11-07 2018-03-30 北京京东尚科信息技术有限公司 The method and apparatus of displayed page
CN108536805A (en) * 2018-04-04 2018-09-14 平安科技(深圳)有限公司 web access method and device

Also Published As

Publication number Publication date
CN109815430A (en) 2019-05-28

Similar Documents

Publication Publication Date Title
CN109815430B (en) Request processing method and device, data processing server and readable storage medium
US20190251143A1 (en) Web page rendering method and related device
CN109683998B (en) Internationalization realization method, device and system
US10015226B2 (en) Methods for making AJAX web applications bookmarkable and crawlable and devices thereof
TWI703463B (en) Information display method, device and intelligent terminal
US8812737B2 (en) Context-specific unicode characters in shortened URLs
CN107070858B (en) Service processing method and device
US20230289395A1 (en) Systems and methods for presenting web application content
CN107463563B (en) Information service processing method and device of browser
US7490141B1 (en) Ajax proxy indirection for external domain requests
US8516041B1 (en) Pre-fetching asynchronously requested content
US11455365B2 (en) Data processing method and apparatus
US8682964B1 (en) Progressively loading network content
US20150193108A1 (en) Drag and Drop Downloading of Content Referenced by Displayed Elements
CN103500210A (en) Method, device and browser for carrying out webpage loading
US20150149888A1 (en) Systems and methods for executing aspects of a document
CN106254216A (en) The control method of message and device in instant communication client
US10846361B2 (en) User-specific customization of web pages
CN103559097A (en) Inter-process communication method and device in browser and browser
CN103279518A (en) Browser
CN110889073B (en) Page request response method, server and computer storage medium
US9158749B2 (en) Smart form completion of form values
CN107918552B (en) Light application calling method and device, client device and electronic equipment
CN112256992A (en) Native rendering method and device for information stream fusing multi-link addresses
US20130111433A1 (en) Method and apparatus for generating application programs

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