CN109815430A - Request processing method, device, data processing server and readable storage medium storing program for executing - Google Patents

Request processing method, device, data processing server and readable storage medium storing program for executing Download PDF

Info

Publication number
CN109815430A
CN109815430A CN201811453799.4A CN201811453799A CN109815430A CN 109815430 A CN109815430 A CN 109815430A CN 201811453799 A CN201811453799 A CN 201811453799A CN 109815430 A CN109815430 A CN 109815430A
Authority
CN
China
Prior art keywords
page
request
web system
back end
access
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811453799.4A
Other languages
Chinese (zh)
Other versions
CN109815430B (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

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a kind of request processing method, device, data processing server and readable storage medium storing program for executing, request processing method is applied to data processing server, and method includes: to judge whether accessing page request is the access request for accessing specified page;Wherein, specified page is that the web system of front and back end separation is capable of providing the page of access service;If the accessing page request is to access the access request of specified page, the front end for the web system that then requested data feedback is separated to front and back end, otherwise, accessing page request is then sent to the rear end of the web system of front and back end coupling, as it can be seen that the web system of front and back end separates in this programme web system and front and back end coupling can provide service simultaneously.The web system of front and back end separation and the web system of front and back end coupling provide service simultaneously, reduce the case where cannot providing a user page access service.

Description

Request processing method, device, data processing server and readable storage medium storing program for executing
Technical field
The present invention relates to technical field of data transmission, more particularly to request processing method, device, data processing server And readable storage medium storing program for executing.
Background technique
There are the web systems of a large amount of front and back ends coupling in traditional Internet application.With the quick hair of Internet technology Exhibition occurs the web system of front and back end separation at present, gradually obtains being widely used for industry.The web system of front and back end separation, Its rear end provides the data-interface based on RESTful framework, and front end is based on this interface displayed page, accomplishes the complete of front and back end with this It is fully separating, wherein RESTful, which refers to, meets REST (Representational State Transfer, performance layer state turn Change) the data-interface framework of prevalence of style a kind of.Due to this front and back end separation web system, Front End not by force according to Rely in rear end program, thus be conducive to program extension maintenance, can also with not depended on mutually in order to the developer of front and back end into Row concurrent development, and rear end can provide general service with cross-terminal.
Currently, more and more enterprises and user wish the web system (letter by original using the exploitation of front and back end coupled modes Claim the web system of front and back end coupling) it is transformed into the web system of above-mentioned front and back end separation;But in transformation process, mainly by preceding The web system response page access request of rear end coupling.Since the web system for coupling front and back end transform front and back end separation as While web system as, existing function pages can also be transform to the page of front and back end separation, to adapt to the web of front and back end separation System, and new function pages may be generated in transformation process according to new demand, these newly-generated function pages are general It is that the web system based on front and back end separation generates, in this case, the web system of front and back end coupling can not provide a user For the access service of newly-generated function pages.
As it can be seen that being transformed into the web system process of front and back end separation in the web system for coupling front and back end in this scheme In, it may appear that the case where page access services cannot be provided a user.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of request processing method, device, data processing server and readable Storage medium is reduced not with realizing during the web system for coupling front and back end is transformed into the web system of front and back end separation The case where page access service can be provided a user.Specific technical solution is as follows:
In a first aspect, in order to achieve the above object, the embodiment of the invention provides a kind of request processing methods, it is applied to number According to processing server, method includes:
Obtain accessing page request;
Judge whether the accessing page request is the access request for accessing specified page;Wherein, the specified page is The web system of front and back end separation is capable of providing the page of access service;
If the accessing page request is to access the access request of the specified page, obtained from pre-stored data Take the requested data of the accessing page request;And acquired data are sent to the web system of the front and back end separation Front end;
If the accessing page request is not the access request for accessing the specified page, by the accessing page request It is sent to the rear end of the web system of front and back end coupling, so that the rear end of the web system of front and back end coupling responds the page Face access request.
It is optionally, described to judge whether the accessing page request is the access request for accessing specified page, comprising:
Whether judge in the access path of the page to be visited comprising target identification, wherein the page to be visited are as follows: described The page that accessing page request requests access to, the web system that the target identification is used to identify front and back end separation are capable of providing visit Ask the page of service;
In the case where including the target identification in the access path, then determine that the accessing page request is access The access request of specified page;
In the case where not including the target identification in the access path, then determine that the accessing page request is not Access the access request of specified page.
Optionally, acquired data are sent to described after the front end of the web system of the front and back end separation, institute State method further include:
Obtain the request of data for data to be displayed in the page to be visited;
The request of data is sent to the rear end of the web system of the front and back end separation, so that the front and back end point From the rear end of web system respond the request of data;
Alternatively, after the rear end of the web system that the accessing page request is sent to front and back end coupling, it is described Method further include:
Obtain the request of data for data to be displayed in the page to be visited;
The request of data is sent to the rear end of the web system of the front and back end coupling, so that the front and back end coupling The rear end of the web system of conjunction responds the request of data.
Optionally, accessing page request is obtained, comprising:
The front end of the front end of the web system of front and back end coupling or the web system of front and back end separation is obtained with Asynchronous Request side The accessing page request that formula is sent.
Optionally, it is stored in the rear end of the web system of the front end of the web system of front and back end separation and front and back end coupling Page access set of paths, wherein before including: the access path of the specified page in page access set of paths and not carrying out The access path of the page of rear end separation transformation;
Accessing page request are as follows: the rear end root of the web system of the front end or front and back end coupling of the web system of front and back end separation The request generated according to the access path in page access set of paths.
Second aspect, in order to achieve the above object, the embodiment of the invention also provides a kind of request processing units, are applied to Data processing server, device include:
First obtains module, for obtaining accessing page request;
Judgment module, for judging whether the accessing page request is the access request for accessing specified page;Wherein, institute State the page that the web system that specified page is front and back end separation is capable of providing access service;
First sending module, for the judging result of judgment module be in the case where, from pre-stored data Obtain the requested data of accessing page request;And acquired data are sent to the front end of the web system of front and back end separation;
Second sending module, in the case where the judging result of judgment module is no, accessing page request to be sent The rear end of the web system coupled to front and back end, so that the rear end response page access request of the web system of front and back end coupling.
Optionally, judgment module is specifically used for:
Whether judge in the access path of the page to be visited comprising target identification, wherein the page to be visited are as follows: described The page that accessing page request requests access to, the web system that the target identification is used to identify front and back end separation are capable of providing visit Ask the page of service;
In the case where including the target identification in the access path, then determine that the accessing page request is access The access request of specified page;
In the case where not including the target identification in the access path, then determine that the accessing page request is not Access the access request of specified page.
Optionally, device further include:
Second obtains module, for obtaining the request of data for being directed to data to be displayed in the page to be visited;
Third sending module, for the judging result of judgment module be in the case where, before request of data is sent to The rear end of the web system of rear end separation, so that the rear end response data request of the web system of front and back end separation;
4th sending module, for the judging result of judgment module be it is no in the case where, before request of data is sent to The rear end of the web system of rear end coupling, so that the rear end response data request of the web system of front and back end coupling.
Optionally, first module is obtained, is used for:
The front end of the front end of the web system of front and back end coupling or the web system of front and back end separation is obtained with Asynchronous Request side The accessing page request that formula is sent.
Optionally, it is stored in the rear end of the web system of the front end of the web system of front and back end separation and front and back end coupling Page access set of paths, wherein before including: the access path of the specified page in page access set of paths and not carrying out The access path of the page of rear end separation transformation;
Accessing page request are as follows: the rear end root of the web system of the front end or front and back end coupling of the web system of front and back end separation The request generated according to the access path in page access set of paths.
The third aspect, in order to achieve the above object, the embodiment of the invention also provides a kind of data processing servers, including Processor and memory, wherein
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes the request processing method of first aspect.
Fourth aspect, in order to achieve the above object, the embodiment of the invention also provides a kind of computer readable storage medium, It is stored with computer program in computer readable storage medium, asking for first aspect is realized when computer program is executed by processor Seek processing method.
5th aspect, the embodiment of the invention provides a kind of computer program products comprising instruction, when it is in computer When upper operation, so that computer executes the request processing method of first aspect.
6th aspect, the embodiment of the invention provides a kind of computer programs, when run on a computer, make to succeed in one's scheme The request processing method of calculation machine execution first aspect.
Request processing method, device, data processing server and readable storage medium storing program for executing provided in an embodiment of the present invention, can be with Judge whether accessing page request is the access request for accessing specified page;Wherein, specified page is the web system of front and back end separation System is capable of providing the page of access service;If the accessing page request is to access the access request of specified page, will be asked Otherwise accessing page request is then sent to front and back end coupling by the front end for the web system that the data feedback asked is separated to front and back end Web system rear end, it is seen then that in this programme front and back end separate web system and front and back end coupling web system can be simultaneously Service is provided.Front and back end separation web system and front and back end coupling web system simultaneously service is provided, reduce cannot to Family provides the case where page access service.Certainly, implement any of the products of the present invention or method it is not absolutely required at the same reach Above all advantages.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow diagram of data processing method provided in an embodiment of the present invention;
Fig. 2 is another flow diagram of data processing method provided in an embodiment of the present invention;
Fig. 3 is another flow diagram of data processing method provided in an embodiment of the present invention;
Fig. 4 is the interaction schematic diagram of request processing provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of data processing equipment provided in an embodiment of the present invention;
Fig. 6 is the structural schematic diagram of data processing server provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention provides a kind of request processing method, device, data processing server and computer-readable deposit Storage media is first below illustrated request processing method provided in an embodiment of the present invention.
Request processing method provided by the embodiment of the present invention can be applied to data processing server, data processing service Device is the server for data processing, and illustratively, data processing server can be static server, and static server is Refer to from local directory and the server of static resource file is provided, static server can be nginx, and nginx is a high-performance HTTP (HyperText Transfer Protocol, hypertext transfer protocol) and Reverse Proxy.
Fig. 1 is a kind of flow diagram of data processing method provided in an embodiment of the present invention, and method includes:
S101: accessing page request is obtained.
Accessing page request is the request of accession page, can be and generates after the request for the accession page for receiving user 's.
S102: judge whether accessing page request is the access request for accessing specified page;Wherein, specified page is front and back Isolated web system is held to be capable of providing the page of access service, if so, S103 is executed, if not, executing S104.
It, can will be functional during the web system for coupling front and back end is transformed into the web system of front and back end separation The page transform the page (front and back end separates the improved page) of front and back end separation as, alternatively, can also be raw according to new demand The function pages (newly-generated function pages) of Cheng Xin.For example, which can separate improved for front and back end The page, or newly-generated function pages.
In embodiments of the present invention, the access that accessing page request can be the page before the separation transformation of access front and back end is asked It asks, is also possible to access the access request of newly-generated function pages, also accessible front and back end separates the improved page Access request.By " access request of the page before the separation transformation of access front and back end " and " access newly-generated function pages Access request " is referred to as " access request of access specified page ".
If accessing page request is to access the access request of specified page, S103 is executed, i.e., according to front and back end separation The corresponding request processing mode of web system handles the accessing page request;If accessing page request is not access specified page Access request, then illustrate the accessing page request be access front and back end coupling the page access request, at this point it is possible to execute S104 handles the accessing page request according to the corresponding request processing mode of web system that front and back end couples.
In embodiments of the present invention, the page iden-tity of the page to be visited, page iden-tity be may include in accessing page request It can be page address, or pre-set for distinguishing the identifier of the page, identifier includes number, letter, word At least one of symbol.As an implementation, the web system that front and back end separation can be identified using target identification can The page of access service, that is, specified page are provided;In this case, S102 may include: the visit for judging the page to be visited It whether asks the way in diameter comprising target identification, wherein the page to be visited are as follows: the page that the accessing page request requests access to Face, the web system that the target identification is used to identify front and back end separation are capable of providing the page of access service;On the access road Comprising in the case where the target identification, then determining that the accessing page request is to access the access request of specified page in diameter; In the case where not including the target identification in the access path, then determining the accessing page request not is that access is specified The access request of the page.Certainly, there is also other judgment modes herein without enumerating.
S103: the requested data of accessing page request are obtained from pre-stored data;And by acquired data It is sent to the front end of the web system of front and back end separation.
Pre-stored data can store in data processing server, also can store in database, can also store In other servers.
Data processing server judge accessing page request obtained be access specified page access request after, Requested data will be obtained in pre-stored data, then acquired data are sent to the web system of front and back end separation The front end of system;Specifically, data processing server is judging that accessing page request obtained is that the access of specified page is asked After asking, which is directed toward to the catalogue of front end project plan, further, using alias alias mode, by the page Access address included in the access request of face becomes pre-set alias, according to the alias, determines front end engineering catalogue The catalogue of front end project plan is found according to identified path in the path at place, then, from the catalogue of front end project plan It is middle to obtain corresponding data, and acquired data are sent to the front end of the web system of front and back end separation, wherein alias is other The function of name is the alias of setting command, to write a Chinese character in simplified form order, improves operating efficiency.By the way of alias alias, so that front end The path of the catalogue of project plan can be arbitrary.
In embodiments of the present invention, the requested data of accessing page request are needed for completing the rendering of the accessed page The data wanted specifically can be HTML (Hyper Text Mark-up Language, hypertext markup language) file, can be with It is CSS (Cascading Style Sheets, cascading style sheets) file, is also possible to JSON (JavaScript Object Notation, JavaScript object label) format text data etc., herein without repeating, wherein mentioned here A kind of literal translation formula scripting language of JavaScript is a kind of regime type, weak type, the language based on prototype, built-in support class Type.
Data processing server is obtaining the requested data of accessing page request, is then sent to acquired data The front end of the front end of the web system of front and back end separation, the system of the web of front and back end separation is receiving data processing server hair After the requested data of the accessing page request sent, data, judge whether also to need to obtain other numbers based on the received According to, if it is desired, accessing page request is then generated, the information of required data is carried in accessing page request generated, Generated accessing page request is sent into data processing server, if it is not needed, the front end of the system of the web of front and back end separation The rendering of the accessed page is completed using data obtained.
Accessing page request: being sent to the rear end of the web system of front and back end coupling by S104, so that front and back end coupling The rear end response page access request of web system.
If accessing page request obtained is not the access request for accessing specified page, illustrate that the page access is asked Seeking Truth access does not carry out the request of the page of front and back end separation transformation, and accessing page request is sent to front and back end coupling at this time The rear end of web system, the rear end of the web system of front and back end coupling respond the accessing page request, i.e. the web system of front and back end coupling The rear end of system by rear end render in a manner of the access of the page is provided, specifically, front and back end coupling web system rear end rendering to The page to be visited rendered is sent to data processing server by the page of access, and data processing server will render The page to be visited sends the front end for sending accessing page request to, and the page to be visited obtained rendered is opened in front end, i.e., Complete the processing of accessing page request.
In embodiments of the present invention, it can be determined that whether accessing page request is the access request for accessing specified page;Its In, specified page is that the web system of front and back end separation is capable of providing the page of access service;If the accessing page request is to visit Ask the access request of specified page, then the front end of the web system separated requested data feedback to front and back end, otherwise, then Accessing page request is sent to the rear end of the web system of front and back end coupling, it is seen then that the web system that front and back end separates in this programme System and the web system of front and back end coupling can provide service simultaneously.The web system of front and back end separation and the web of front and back end coupling System provides service simultaneously, reduces the case where cannot providing a user page access service.
Fig. 2 is another flow diagram of data processing method provided in an embodiment of the present invention, and method includes:
S201: accessing page request is obtained.
S202: whether judge in the access path of the page to be visited comprising target identification, wherein the page to be visited are as follows: page The page that face access request requests access to, the web system that target identification is used to identify front and back end separation are capable of providing access service The page, if comprising target identification, execute S203;If not including target identification, S204 is executed.
The corresponding page to be visited of one accessing page request, the page to be visited is exactly that accessing page request requests access to The page, in embodiments of the present invention, be completed front and back end separation transformation the page and newly-generated function pages, also It is not carry out the corresponding visit of the page of front and back end separation transformation comprising target identification in the corresponding access path of above-mentioned specified page Ask the way and do not include target identification in diameter, if it is judged that include target identification in the access path of the page to be visited, then explanation to The page of access is above-mentioned specified page, then executes S203, if it is judged that not including mesh in the access path of the page to be visited Mark mark then illustrates that the page to be visited is the page for not carrying out front and back end separation transformation, then executes S204.
It in embodiments of the present invention, include the access address of the page to be visited in accessing page request, access address can be with It is page address, that is, URL (Uniform Resource Locator, Uniform Resource Locator) address.If to be visited The page is the page that front and back end separation transformation is completed, then before target identification can be used as the access address of the page to be visited Sew, illustratively, the page to be visited is the page 1, and the access address for not carrying out the page 1 of front and back end separation transformation is /admin/ AddUser.do, target identification are /new/, carry out front and back end separation transformation, the access address of the improved page 1 to the page 1 Are as follows:/new/admin/addUser.do.
S203: the requested data of accessing page request are obtained from pre-stored data;And by acquired data It is sent to the front end of the web system of front and back end separation.
Accessing page request: being sent to the rear end of the web system of front and back end coupling by S204, so that front and back end coupling The rear end response page access request of web system.
In an embodiment of the invention, the web system of the front end of the web system of front and back end separation and front and back end coupling Page access set of paths is stored in the rear end of system, wherein include: the specified page in page access set of paths Access path separates the access path for the page being transformed, accessing page request with front and back end is not carried out are as follows: the web of front and back end separation The rear end of the web system of the front end of system or front and back end coupling is asked according to what the access path in page access set of paths generated It asks.
Due to being stored in the front end for the web system that front and back end separates and the rear end of the web system of front and back end coupling Page access set of paths, so that the web system of front and back end separation can be provided by corresponding front end and complete front and back end The access for separating the page and newly-generated function pages of transformation can also provide the page for not carrying out front and back end separation transformation Access;Likewise, the web system of front and back end coupling can provide the page for completing front and back end separation transformation by corresponding rear end The access of face and newly-generated function pages can also provide the access for not carrying out the page of front and back end separation transformation, before being Service provides the foundation while the web system that the web system of rear end coupling is separated with front and back end.
When user's request accesses to a page, the front end of the web system of front and back end separation or front and back end coupling Web system rear end after receiving the request of user, determine the access address for the page to be visited of user requested access to, According to identified access address, accessing page request is generated, includes identified access in accessing page request generated Address.Data processing server is after obtaining accessing page request, it can be determined that the page included in accessing page request Whether location includes target identification, then, determines the response mode to accessing page request according to judging result.According to page access The request that access path in set of paths generates, for front and back end coupling the web system that is separated with front and back end of web system it is same When service provide guarantee.
In embodiments of the present invention, the web system of front and back end separation and the web system of front and back end coupling service simultaneously, and And page access path is stored in the rear end of the web system of the front end and front and back end coupling of the web system of front and back end separation The web system access of set, web system and front and back end coupling that the noninductive switching front and back end separation of user may be implemented in this way needs The function for the page wanted, i.e. user to the page carry out front and back end separation transformation be noninductive because either front and back end separation Web system or the web system of front and back end coupling are provided which the access of all pages, the front and back end separation transformation of the page to The access at family will not generate any influence, and user is in addition to after it can see that page-out is whether to complete separation transformation in page address The page, to the process of the front and back end of page separation transformation perceive less than.
In embodiments of the present invention, it can be determined that whether accessing page request is the access request for accessing specified page;Its In, specified page is that the web system of front and back end separation is capable of providing the page of access service;If the accessing page request is to visit Ask the access request of specified page, then the front end of the web system separated requested data feedback to front and back end, otherwise, then Accessing page request is sent to the rear end of the web system of front and back end coupling, it is seen then that the web system that front and back end separates in this programme System and the web system of front and back end coupling can provide service simultaneously.The web system of front and back end separation and the web of front and back end coupling System provides service simultaneously, reduces the case where cannot providing a user page access service.
Fig. 3 is another flow diagram of data processing method provided in an embodiment of the present invention, and method includes:
S301: accessing page request is obtained.
S302: whether judge in the access path of the page to be visited comprising target identification, wherein the page to be visited are as follows: page The page that face access request requests access to, the web system that target identification is used to identify front and back end separation are capable of providing access service The page, if comprising target identification, execute S303;If not including target identification, S304 is executed.
S303: the requested data of accessing page request are obtained from pre-stored data;And by acquired data It is sent to the front end of the web system of front and back end separation.
Accessing page request: being sent to the rear end of the web system of front and back end coupling by S304, so that front and back end coupling The rear end response page access request of web system.
After S303, S305A can be continued to execute, S305B, S305A and S305B can be continued to execute after S304 All can be: obtain the request of data for data to be displayed in the page to be visited.
What the front end that request of data mentioned here can be the web system of front and back end coupling was sent, it is also possible to front and back Hold the front end transmission of isolated web system, request of data can be the acquisition for data to be displayed in the page to be visited and ask It asks.Request of data can be understood as in user in the request for continuing to generate when other operations on the page.
Such as, it is assumed that the page is shopping page, response page access request, after showing shopping page to user, Yong Hudian " comment " option in shopping page is hit, in this case, it is believed that obtain request of data, which namely asks Seek " comment " data under " comment " option.
S306 can be executed after S305A: request of data is sent to the rear end of the web system of front and back end separation, with So that the rear end response data request of the web system of front and back end separation.
Data processing server is in the case where judging the page to be visited is specified page, before request of data is sent to The rear end of the web system of rear end separation, the rear end of the web system of front and back end separation respond the number after receiving request of data According to request, specifically, then obtaining the corresponding data of request of data is sent to data processing server for data obtained, Data processing server forwards the data to the front end for sending the request of data, and front end mentioned here refers to that sending the data asks The front end asked can be the front end of the web system of front and back end separation, be also possible to the front end of the web system of front and back end coupling.
S307 can be executed after S305A: request of data is sent to the rear end of the web system of front and back end coupling, with So that the rear end response data request of the web system of front and back end coupling.
Data processing server judge the page to be visited be do not carry out front and back end separation transformation the page in the case where, Request of data is sent to the rear end of the web system of front and back end coupling, the rear end of the web system of front and back end coupling is receiving number After request, the request of data is responded, then sends data obtained specifically, obtaining the corresponding data of request of data To data processing server, data processing server forwards the data to the front end for sending the request of data, before mentioned here End refers to the front end for sending the request of data, can be the front end of the web system of front and back end separation, is also possible to front and back end coupling Web system front end.
The request of data that the front end of the web system of the front end or front and back end coupling of the web system of front and back end separation is initiated is logical The data-interface that data processing server is forwarded to corresponding rear end is crossed, the data-interface of rear end can be Restful data and connect Mouthful, Restful is a kind of software architecture style, design style rather than standard, merely provides one group of design principle and constraint Condition.It is mainly used for the software of client and server interactive class.Software based on this Style Design can be more succinct, more Have levels, it is easier to realize the mechanism such as caching.
In embodiments of the present invention, after obtaining accessing page request, in the access address for judging the page to be visited In the case where comprising target identification, the front end for the web system that requested data feedback is separated to front and back end, if do not included Accessing page request is then sent to the rear end of the web system of front and back end coupling by target identification.After obtaining request of data, In the case where judging that the page to be visited is specified page, which is responded by the rear end of the web system of front and back end separation, Otherwise, which is responded by the rear end of the web system of front and back end coupling, illustrates web system and the front and back of front and back end separation The web system of coupling is held to provide service simultaneously.The web system of front and back end separation and the web system of front and back end coupling provide simultaneously Service reduces the case where cannot providing a user page access service.
In an embodiment of the invention, accessing page request is obtained, comprising:
The front end of the front end of the web system of front and back end coupling or the web system of front and back end separation is obtained with Asynchronous Request side The accessing page request that formula is sent.
Asynchronous Request refers to the front end of the front end web system of the web system of front and back end coupling or the web system of front and back end separation The front end of system is not to wait for the response of data processing server, can send another page after sending an accessing page request Face access request.The Asynchronous Request can for Ajax (Asynchronous JavaScript and Xml, it is asynchronous JavaScript and XML) Asynchronous Request, Ajax is in the case where not reloading full page, with server exchange data And the art of update section subnetting page;A kind of technology for supporting Asynchronous Request, wherein JavaScript be it is a kind of based on object and Event-driven and with relative safety client-side scripting language, while be also it is a kind of be widely used in client web exploitation Scripting language;XML (Extensible Markup Language, extensible markup language) is to define electronic document knot in the world The standard of structure and content description is a kind of extremely complex file structure, is mainly used for the defence of a large amount of highly structural data Area and various other industrial circles, convenient for classification and index.Ajax introduces an intermediary between user and server, from And eliminate processing-waiting-processing-waiting disadvantage during the network interconnection.Ajax allows between user and application software The asynchronous progress of interactive process, independently of exchanging between user and network server.Now, Ajax can be called with JavaScript Engine replaces generating the user action of a HTTP, data edition in memory, page navigation, data check these do not need Again the demand for being loaded into full page can give Ajax to execute.
Data processing server obtains the accessing page request sent in a manner of Asynchronous Request, can concurrently handle multiple Accessing page request improves the ability of data processing request server process accessing page request.
In embodiments of the present invention, the front end for the web system that the front end of the web system of front and back end separation is coupled with front and back end It can be located in same physical machine, the rear end for the web system that the rear end of the web system of front and back end separation is coupled with front and back end can To be the same rear end, herein in the case of, it is provided in an embodiment of the present invention request processing interaction as shown in figure 4, at data Reason server is receiving the corresponding data feedback of accessing page request with/new/ prefix to front end, will be with/data/ The request of data of prefix is sent to rear end and responds these requests by rear end without the request of prefix, wherein without the request of prefix Including the accessing page request without/new/ prefix and without the request of data of/data/ prefix;It will response after the response of rear end As a result front end is sent to by data processing server.
Fig. 5 is the structural schematic diagram of request processing unit provided in an embodiment of the present invention, and data processing equipment is applied to number According to processing server, data processing equipment includes:
First obtains module 501, for obtaining accessing page request;
Judgment module 502, for judging whether the accessing page request is the access request for accessing specified page;Its In, the specified page is that the web system of front and back end separation is capable of providing the page of access service;
First sending module 503, in the case where the judging result of judgment module 502, which is, is, from pre-stored The requested data of accessing page request are obtained in data;And acquired data are sent to the web system of front and back end separation Front end;
Second sending module 504, in the case where the judging result of judgment module 502 is no, page access to be asked The rear end for being sent to the web system of front and back end coupling is asked, so that the rear end response page access of the web system of front and back end coupling Request.
In embodiments of the present invention, judge whether accessing page request is the access request for accessing specified page;Wherein, refer to Determine the page that the web system that the page is front and back end separation is capable of providing access service;If the accessing page request is that access refers to Determine the access request of the page, then the front end of the web system separated requested data feedback to front and back end, otherwise, then by page Face access request be sent to front and back end coupling web system rear end, it is seen then that in this programme front and back end separate web system and The web system of front and back end coupling can provide service simultaneously.The web system of front and back end separation and the web system of front and back end coupling Service is provided simultaneously, reduces the case where cannot providing a user page access service.
In an embodiment of the invention, judgment module 502 are used for:
Whether judge in the access path of the page to be visited comprising target identification, wherein the page to be visited are as follows: described The page that accessing page request requests access to, the web system that the target identification is used to identify front and back end separation are capable of providing visit Ask the page of service;
In the case where including the target identification in the access path, then determine that the accessing page request is access The access request of specified page;
In the case where not including the target identification in the access path, then determine that the accessing page request is not Access the access request of specified page.
In an embodiment of the invention, which can also include:
Second obtains module, for obtaining the request of data for being directed to data to be displayed in the page to be visited;
Third sending module, in the case where the judging result of judgment module 502, which is, is, request of data to be sent to The rear end of the web system of front and back end separation, so that the rear end response data request of the web system of front and back end separation;
4th sending module, in the case where the judging result of judgment module 502 is no, request of data to be sent to The rear end of the web system of front and back end coupling, so that the rear end response data request of the web system of front and back end coupling.
In an embodiment of the invention, first module 501 is obtained, is used for:
The front end of the front end of the web system of front and back end coupling or the web system of front and back end separation is obtained with Asynchronous Request side The accessing page request that formula is sent.
In an embodiment of the invention, the web system of the front end of the web system of front and back end separation and front and back end coupling Page access set of paths is stored in the rear end of system, wherein include: the specified page in page access set of paths Access path separates the access path for the page being transformed with front and back end is not carried out;
Accessing page request are as follows: the rear end root of the web system of the front end or front and back end coupling of the web system of front and back end separation The request generated according to the access path in page access set of paths.
The embodiment of the invention also provides a kind of data processing servers, as shown in fig. 6, including processor 601 and storage Device 602;
Memory 602, for storing computer program;
Processor 601 when for executing the program stored on memory 602, realizes any one of above-described embodiment Optionally following steps may be implemented in request processing method:
Obtain accessing page request;
Judge whether the accessing page request is the access request for accessing specified page;Wherein, the specified page is The web system of front and back end separation is capable of providing the page of access service;
If the accessing page request is to access the access request of the specified page, obtained from pre-stored data Take the requested data of the accessing page request;And acquired data are sent to the web system of the front and back end separation Front end;
If the accessing page request is not the access request for accessing the specified page, by the accessing page request It is sent to the rear end of the web system of front and back end coupling, so that the rear end of the web system of front and back end coupling responds the page Face access request.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
In embodiments of the present invention, judge whether accessing page request is the access request for accessing specified page;Wherein, refer to Determine the page that the web system that the page is front and back end separation is capable of providing access service;If the accessing page request is that access refers to Determine the access request of the page, then the front end of the web system separated requested data feedback to front and back end, otherwise, then by page Face access request be sent to front and back end coupling web system rear end, it is seen then that in this programme front and back end separate web system and The web system of front and back end coupling can provide service simultaneously.The web system of front and back end separation and the web system of front and back end coupling Service is provided simultaneously, reduces the case where cannot providing a user page access service.
In another embodiment of the present invention, a kind of computer readable storage medium, computer-readable storage are additionally provided Dielectric memory contains computer program, and request processing any in above-described embodiment is realized when computer program is executed by processor Method.
In embodiments of the present invention, judge whether accessing page request is the access request for accessing specified page;Wherein, refer to Determine the page that the web system that the page is front and back end separation is capable of providing access service;If the accessing page request is that access refers to Determine the access request of the page, then the front end of the web system separated requested data feedback to front and back end, otherwise, then by page Face access request be sent to front and back end coupling web system rear end, it is seen then that in this programme front and back end separate web system and The web system of front and back end coupling can provide service simultaneously.The web system of front and back end separation and the web system of front and back end coupling Service is provided simultaneously, reduces the case where cannot providing a user page access service.
In another embodiment of the present invention, a kind of computer program product comprising instruction is additionally provided, when it is being counted When being run on calculation machine, so that computer executes request processing method any in above-described embodiment.
In embodiments of the present invention, judge whether accessing page request is the access request for accessing specified page;Wherein, refer to Determine the page that the web system that the page is front and back end separation is capable of providing access service;If the accessing page request is that access refers to Determine the access request of the page, then the front end of the web system separated requested data feedback to front and back end, otherwise, then by page Face access request be sent to front and back end coupling web system rear end, it is seen then that in this programme front and back end separate web system and The web system of front and back end coupling can provide service simultaneously.The web system of front and back end separation and the web system of front and back end coupling Service is provided simultaneously, reduces the case where cannot providing a user page access service.
In another embodiment of the present invention, a kind of computer program is additionally provided, when run on a computer, is made It obtains computer and executes request processing method any in above-described embodiment.
In embodiments of the present invention, judge whether accessing page request is the access request for accessing specified page;Wherein, refer to Determine the page that the web system that the page is front and back end separation is capable of providing access service;If the accessing page request is that access refers to Determine the access request of the page, then the front end of the web system separated requested data feedback to front and back end, otherwise, then by page Face access request be sent to front and back end coupling web system rear end, it is seen then that in this programme front and back end separate web system and The web system of front and back end coupling can provide service simultaneously.The web system of front and back end separation and the web system of front and back end coupling Service is provided simultaneously, reduces the case where cannot providing a user page access service.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.At request For managing device/data processing server/computer readable storage medium embodiment, implement since it is substantially similar to method Example, so being described relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
The above is merely preferred embodiments of the present invention, it is not intended to limit the scope of the present invention.It is all in this hair Any modification, equivalent replacement, improvement and so within bright spirit and principle, are included within the scope of protection of the present invention.

Claims (12)

1. a kind of request processing method, which is characterized in that be applied to data processing server, which comprises
Obtain accessing page request;
Judge whether the accessing page request is the access request for accessing specified page;Wherein, the specified page is front and back Isolated web system is held to be capable of providing the page of access service;
If the accessing page request is to access the access request of the specified page, institute is obtained from pre-stored data State the requested data of accessing page request;And before acquired data to be sent to the web system of the front and back end separation End;
If the accessing page request is not the access request for accessing the specified page, the accessing page request is sent The rear end of the web system coupled to front and back end is visited so that the rear end of the web system of front and back end coupling responds the page Ask request.
2. judging whether the accessing page request is that access refers to the method according to claim 1, wherein described Determine the access request of the page, comprising:
Whether judge in the access path of the page to be visited comprising target identification, wherein the page to be visited are as follows: the page The page that access request requests access to, the web system that the target identification is used to identify front and back end separation are capable of providing access clothes The page of business;
In the case where including the target identification in the access path, then determine that the accessing page request is that access is specified The access request of the page;
In the case where not including the target identification in the access path, then determining the accessing page request not is access The access request of specified page.
3. according to the method described in claim 2, it is characterized in that, acquired data are sent to the front and back end described After the front end of isolated web system, the method also includes:
Obtain the request of data for data to be displayed in the page to be visited;
The request of data is sent to the rear end of the web system of the front and back end separation, so that front and back end separation The rear end of web system responds the request of data;
Alternatively, after the rear end of the web system that the accessing page request is sent to front and back end coupling, the method Further include:
Obtain the request of data for data to be displayed in the page to be visited;
The request of data is sent to the rear end of the web system of the front and back end coupling, so that front and back end coupling The rear end of web system responds the request of data.
4. method according to any one of claim 1-3, which is characterized in that the acquisition accessing page request, comprising:
The front end of the front end of the web system of the front and back end coupling or the web system of front and back end separation is obtained with Asynchronous Request side The accessing page request that formula is sent.
5. method according to any one of claim 1-3, which is characterized in that
Page visit is stored in the rear end of the web system of the front end and front and back end coupling of the web system of the front and back end separation Ask set of paths, wherein before and after including: the access path of the specified page in the page access set of paths and not carrying out The access path of the page of end separation transformation;
The accessing page request are as follows: behind the front end of the web system of the front and back end separation or the web system of front and back end coupling The request that end is generated according to the access path in the page access set of paths.
6. a kind of request processing unit, which is characterized in that be applied to data processing server, described device includes:
First obtains module, for obtaining accessing page request;
Judgment module, for judging whether the accessing page request is the access request for accessing specified page;Wherein, the finger Determine the page that the web system that the page is front and back end separation is capable of providing access service;
First sending module, for the judging result of the judgment module be in the case where, from pre-stored data Obtain the requested data of the accessing page request;And acquired data are sent to the web system of front and back end separation Front end;
Second sending module, for the judging result of the judgment module be it is no in the case where, by the accessing page request It is sent to the rear end of the web system of front and back end coupling, so that the rear end of the web system of front and back end coupling responds the page Face access request.
7. device according to claim 6, which is characterized in that the judgment module is used for:
Whether judge in the access path of the page to be visited comprising target identification, wherein the page to be visited are as follows: the page The page that access request requests access to, the web system that the target identification is used to identify front and back end separation are capable of providing access clothes The page of business;
In the case where including the target identification in the access path, then determine that the accessing page request is that access is specified The access request of the page;
In the case where not including the target identification in the access path, then determining the accessing page request not is access The access request of specified page.
8. device according to claim 7, which is characterized in that described device further include:
Second obtains module, for obtaining the request of data for being directed to data to be displayed in the page to be visited;
Third sending module, in the case where the judging result of the judgment module, which is, is, the request of data to be sent To the rear end of the web system of front and back end separation, so that the rear end of the web system of front and back end separation responds the number According to request;
4th sending module, in the case where the judging result of the judgment module is no, the request of data to be sent To the rear end of the web system of front and back end coupling, so that the rear end of the web system of front and back end coupling responds the number According to request.
9. device a method according to any one of claims 6-8, which is characterized in that described first obtains module, is used for:
The front end of the front end of the web system of the front and back end coupling or the web system of front and back end separation is obtained with Asynchronous Request side The accessing page request that formula is sent.
10. device a method according to any one of claims 6-8, which is characterized in that
Page visit is stored in the rear end of the web system of the front end and front and back end coupling of the web system of the front and back end separation Ask set of paths, wherein before and after including: the access path of the specified page in the page access set of paths and not carrying out The access path of the page of end separation transformation;
The accessing page request are as follows: behind the front end of the web system of the front and back end separation or the web system of front and back end coupling The request that end is generated according to the access path in the page access set of paths.
11. a kind of data processing server, which is characterized in that including processor, communication interface, memory and communication bus, In, processor, communication interface, memory completes mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any method and step of claim 1-5.
12. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium Program realizes claim 1-5 any method and step when the computer program is executed by processor.
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 true CN109815430A (en) 2019-05-28
CN109815430B 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)

Cited By (7)

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

Citations (6)

* 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
US20170109245A1 (en) * 2013-05-15 2017-04-20 Amazon Technologies, Inc. Managing contingency capacity of pooled resources in multiple availability zones
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

Patent Citations (6)

* 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
US20170109245A1 (en) * 2013-05-15 2017-04-20 Amazon Technologies, Inc. Managing contingency capacity of pooled resources in multiple availability zones
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

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110399157A (en) * 2019-07-05 2019-11-01 苏州浪潮智能科技有限公司 A kind of method for Ambari tool page development and exploitation machine
CN110399157B (en) * 2019-07-05 2022-09-20 苏州浪潮智能科技有限公司 Method and development machine for developing Ambari tool page
CN111752559A (en) * 2019-11-07 2020-10-09 北京沃东天骏信息技术有限公司 Front-end and back-end separation system, method, device and storage medium
CN111752559B (en) * 2019-11-07 2024-02-06 北京沃东天骏信息技术有限公司 Front-end and back-end separation system, method, device and storage medium
CN111343270A (en) * 2020-02-26 2020-06-26 山东浪潮通软信息科技有限公司 Screen control method and system, cloud server and controller
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
CN112528274A (en) * 2020-12-24 2021-03-19 微医云(杭州)控股有限公司 Data 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

Also Published As

Publication number Publication date
CN109815430B (en) 2020-07-31

Similar Documents

Publication Publication Date Title
CN109815430A (en) Request processing method, device, data processing server and readable storage medium storing program for executing
CN106528432B (en) The construction method and device of test scene data bury a test method
JP5443513B2 (en) Method and system for handling cookies across domains
CN103984686B (en) page switching method and device
CN104426925B (en) Web page resources acquisition methods and device
CN100562873C (en) Obtain the system and method for web page element in the webpage
CN104423991B (en) Webpage, the method and device that web data is provided are loaded in mobile terminal
CN102647481B (en) A kind of device and method of the access preset network address
US20080294978A1 (en) Semantic navigation through web content and collections of documents
WO2013143403A1 (en) Method and system for accessing website
CN105930528A (en) Webpage cache method and server
US10943063B1 (en) Apparatus and method to automate website user interface navigation
US9967356B2 (en) Bulk uploading of multiple self-referencing objects
CN106919634A (en) Across the method and web browser of Application share data
CN106897336A (en) Web page files sending method, webpage rendering intent and device, webpage rendering system
CN105095220B (en) A kind of browser implementation method, terminal and virtualization agent device
JP5781105B2 (en) History management system and history management method
CN103577426B (en) For providing the method, apparatus and system of the additional application information that search is suggested
CN103618742B (en) Webmaster's method for verifying authority
US8930349B2 (en) Selectively modifying search engine results
CN104468720A (en) Method for determining preview link and providing dynamic preview information for preview link
CN105446981B (en) Map of website generation method, access method and device
US8458146B2 (en) Accessing data remotely
US9594836B2 (en) Adjusting search level detail
US11622027B2 (en) Information processing apparatus, information processing method, and storage medium

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